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/system-prompt/src/resolver.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'packages/system-prompt/src/resolver.ts') diff --git a/packages/system-prompt/src/resolver.ts b/packages/system-prompt/src/resolver.ts index eed7bcb..1ef9028 100644 --- a/packages/system-prompt/src/resolver.ts +++ b/packages/system-prompt/src/resolver.ts @@ -55,6 +55,7 @@ export interface ResolverAdapters { export interface ResolverContext { readonly model?: string; readonly conversationId?: string; + readonly workspaceId?: string; } export interface ResolveOptions { @@ -116,6 +117,7 @@ export async function resolveVariables( vars.set("prompt:cwd", cwd); vars.set("prompt:model", ctx?.model ?? null); vars.set("prompt:conversation_id", ctx?.conversationId ?? null); + vars.set("prompt:workspace_id", ctx?.workspaceId ?? null); // ── git:* ──────────────────────────────────────────────────────────────── // branch is a single value — trim fully; status keeps its leading status -- cgit v1.2.3