summaryrefslogtreecommitdiffhomepage
path: root/packages/system-prompt/src/resolver.ts
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-06-24 01:23:55 +0900
committerAdam Malczewski <[email protected]>2026-06-24 01:23:55 +0900
commit3a688edee373cbbc291a149e50e1d2802e2e29a4 (patch)
tree95ce88628426cf6ba79fdf3a276b040617353034 /packages/system-prompt/src/resolver.ts
parentb9abc1f8d8815f57e7b958b871ad85db205a9257 (diff)
downloaddispatch-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/system-prompt/src/resolver.ts')
-rw-r--r--packages/system-prompt/src/resolver.ts2
1 files changed, 2 insertions, 0 deletions
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