Re-runs the head step's agent with a supplementary prompt and replaces the head step (rewires new step's prev to old head's prev) instead of appending. Skips moderator re-route — the role of the head step is reused. Fixes #144
This commit is contained in:
@@ -17,6 +17,7 @@ import {
|
||||
cmdThreadCancel,
|
||||
cmdThreadExec,
|
||||
cmdThreadList,
|
||||
cmdThreadPoke,
|
||||
cmdThreadRead,
|
||||
cmdThreadResume,
|
||||
cmdThreadShow,
|
||||
@@ -290,6 +291,26 @@ thread
|
||||
});
|
||||
});
|
||||
|
||||
thread
|
||||
.command("poke")
|
||||
.description("Re-run the head step's agent with a supplementary prompt (replaces head step)")
|
||||
.argument("<thread-id>", "Thread ULID")
|
||||
.requiredOption("-p, --prompt <text>", "Supplementary prompt for the agent")
|
||||
.option("--agent <cmd>", "Override agent command (defaults to head step's agent)")
|
||||
.action((threadId: string, opts: { prompt: string; agent: string | undefined }) => {
|
||||
const storageRoot = resolveStorageRoot();
|
||||
runAction(async () => {
|
||||
const agentOverride = opts.agent ?? null;
|
||||
const result = await cmdThreadPoke(
|
||||
storageRoot,
|
||||
threadId as ThreadId,
|
||||
opts.prompt,
|
||||
agentOverride,
|
||||
);
|
||||
writeOutput(result);
|
||||
});
|
||||
});
|
||||
|
||||
thread
|
||||
.command("stop")
|
||||
.description("Stop background execution of a thread (keep thread active)")
|
||||
|
||||
Reference in New Issue
Block a user