diff options
| author | Adam Malczewski <[email protected]> | 2026-06-24 01:23:55 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-24 01:23:55 +0900 |
| commit | 3a688edee373cbbc291a149e50e1d2802e2e29a4 (patch) | |
| tree | 95ce88628426cf6ba79fdf3a276b040617353034 /packages/session-orchestrator/src | |
| parent | b9abc1f8d8815f57e7b958b871ad85db205a9257 (diff) | |
| download | dispatch-3a688edee373cbbc291a149e50e1d2802e2e29a4.tar.gz dispatch-3a688edee373cbbc291a149e50e1d2802e2e29a4.zip | |
feat(system-prompt): add prompt:workspace_id variable
Lets the AI know which workspace it's in — especially useful when summoning
agents. Wired through the construct context in both the regular turn flow
and the compaction flow.
Diffstat (limited to 'packages/session-orchestrator/src')
| -rw-r--r-- | packages/session-orchestrator/src/orchestrator.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/session-orchestrator/src/orchestrator.ts b/packages/session-orchestrator/src/orchestrator.ts index 5398867..7599a0c 100644 --- a/packages/session-orchestrator/src/orchestrator.ts +++ b/packages/session-orchestrator/src/orchestrator.ts @@ -489,6 +489,7 @@ export function createSessionOrchestrator( effectiveCwd ?? process.cwd(), { ...(modelName !== undefined ? { model: modelName } : {}), + ...(workspaceId !== undefined ? { workspaceId } : {}), }, ); } else { @@ -952,8 +953,10 @@ export function createCompactionService( let compactionSystemPrompt: string; if (systemPromptService !== undefined) { const cwd = (await deps.conversationStore.getEffectiveCwd(conversationId)) ?? process.cwd(); + const workspaceId = await deps.conversationStore.getWorkspaceId(conversationId); const constructed = await systemPromptService.construct(conversationId, cwd, { ...(opts?.modelName !== undefined ? { model: opts.modelName } : {}), + workspaceId, }); compactionSystemPrompt = `${constructed}\n\n${COMPACTION_SYSTEM_PROMPT}`; } else { |
