mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 21:21:10 +02:00
Since Phase 2d.2 of the space-scoped rollout, each Space can have its own kontextDoc. Before this commit, the module was a user-level singleton keyed by id='singleton' — which meant Shared/Brand/Family Spaces saw the user's Personal-Space bio as their AI planner context. Changes: - types.ts: relax LocalKontextDoc.id to plain string (was the literal 'singleton'). KONTEXT_SINGLETON_ID stays as an exported const so legacy Personal-Space rows (stamped before the refactor) are documented; no longer used at write sites. - stores/kontext.svelte.ts: ensureDoc() finds the active-Space row via scopedTable(), creates a fresh UUID row if absent. setContent / appendContent operate on the found-or-created row's id. Personal- Space's legacy 'singleton' row keeps rendering because the `_personal:<userId>` sentinel is inside getInScopeSpaceIds()'s returned set. - queries.ts: useKontextDoc() mirrors the same scopedTable filter. - ai/missions/default-resolvers.ts: kontextIndexer surfaces the active Space's kontextDoc (not hardcoded 'singleton'). Shared-Spaces without a doc yet return an empty candidate list, which is the correct empty-state for the mission-input picker. Type-check clean. No schema change; relies on v28's existing spaceId stamping + the creating-hook's ongoing stamp (kontextDoc is in the kontext module.config). 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 | ||