mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 19:41:09 +02:00
Agents can now pin a default writing style. When an AI-actor runs `create_draft` without an explicit styleId, the tool resolves to the agent's `defaultWritingStyleId` so e.g. a "Marketing-Agent" always drafts in the Corporate-Tone style and a "Memoir-Agent" in Memoir. - @mana/shared-ai: optional `defaultWritingStyleId?: string` added to the Agent interface (plaintext FK, format `preset:<id>` or a custom WritingStyle uuid). No migration — existing rows stay undefined and the fallback path no-ops for them. - ai-agents store: field threaded through CreateAgentInput + AgentPatch + the create function's copy-list. `updateAgent` already deep-clones the patch so nothing else to change there. - ai-agents ListView: new "Writing" section in the agent detail panel with a StylePicker (reuses the writing module's component — Vorlagen + Meine Stile optgroups). Empty = kein Default. - writing/tools.ts: `resolveAgentDefaultStyle()` reads the current actor, guards `isAiActor`, loads the agent row, and returns its defaultWritingStyleId. Wired into `create_draft` as a fallback when `params.styleId` is missing. User-invoked calls skip the lookup — a human omitting styleId means "ad-hoc, no style", not "my default". `generate_draft_content` needs no change because the draft's styleId is already set at create time. 107 shared-ai tests still pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| api | ||
| calc/packages/shared | ||
| calendar | ||
| cards | ||
| chat | ||
| citycorners | ||
| contacts | ||
| context | ||
| docs | ||
| food | ||
| guides | ||
| inventory | ||
| mana | ||
| manavoxel | ||
| memoro | ||
| moodlit | ||
| mukke | ||
| news | ||
| photos | ||
| picture | ||
| plants | ||
| presi | ||
| questions | ||
| quotes/packages/content | ||
| skilltree | ||
| storage | ||
| times | ||
| todo | ||
| traces | ||
| uload | ||