Let helpers run at a strength matched to their job, chosen in the Subagents dialog

AI Assisted
This commit is contained in:
jparkerweb committed 2026-10-25 15:33:35 -07:00
1 parent 5f91fb665f
commit 1d146cce6f
23 files changed
+482 -73

No files matched your search

+3 -3
View File
@@ -455,15 +455,15 @@ function subagentsPost(req, res, ctx) {
if (!state || !offered(state.workflow)) return json(res, 400, { error: "not-offered" });
const clean = cleanSetting(body);
if (clean.error) return json(res, 400, { error: clean.error });
const { on, instruction, max } = clean;
const { on, instruction, max, strength } = clean;
const current = readSubagentSetting(ctx.dir);
const next = { workflow: state.workflow, on, instruction, max };
const next = { workflow: state.workflow, on, instruction, max, strength };
// The store is per project, so another session may have moved it since
// this one synced: it always takes the person's latest pick. Only a
// real change to this session's setting bumps what the agent hears.
const unchanged = Boolean(current && sameSetting(current, next));
try {
saveSubagentStoreEntry(ctx.worktree(), state.workflow, { on, instruction, max });
saveSubagentStoreEntry(ctx.worktree(), state.workflow, { on, instruction, max, strength });
if (!unchanged) writeSubagentSetting(ctx.dir, { ...next, revision: (current ? current.revision : 0) + 1 });
} catch (e) {
return json(res, 500, { error: String(e.message) });