From 3a688edee373cbbc291a149e50e1d2802e2e29a4 Mon Sep 17 00:00:00 2001 From: Adam Malczewski Date: Wed, 24 Jun 2026 01:23:55 +0900 Subject: feat(system-prompt): add prompt:workspace_id variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- packages/session-orchestrator/src/orchestrator.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'packages/session-orchestrator/src') 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 { -- cgit v1.2.3