summaryrefslogtreecommitdiffhomepage
path: root/packages/core/src/agents
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-05-23 05:06:12 +0900
committerAdam Malczewski <[email protected]>2026-05-23 05:06:12 +0900
commit9287cccb29d135ea19f2612c26f3090c94820d8c (patch)
tree2d68e8cacf6d71786f305d5f4a512a68f19137c5 /packages/core/src/agents
parentef427d3eae77fca716c203dd8bd84939710c518a (diff)
downloaddispatch-9287cccb29d135ea19f2612c26f3090c94820d8c.tar.gz
dispatch-9287cccb29d135ea19f2612c26f3090c94820d8c.zip
feat: add is_subagent flag to agents, fix all lint/type/test issues
- Add is_subagent checkbox to agent editor; subagents are hidden from Chat Settings - Add is_subagent field to AgentDefinition type, TOML serialization, and API route - Filter subagents from ModelSelector agent list - Fix all biome lint/format errors across codebase (useLiteralKeys, noNonNullAssertion, noExplicitAny, formatting, import sorting) - Fix svelte-check errors (type narrowing in SkillsBrowser, ToolPermissions, SidebarPanel) - Fix a11y warnings in App.svelte (label-control associations) - Fix test mocks missing BackgroundShellStore, BackgroundTranscriptStore, createWebSearchTool, createYoutubeTranscribeTool - Update stale 409 test to match current message-queuing behavior - Exclude packaging/ and release/ dirs from biome to avoid linting stale build artifacts
Diffstat (limited to 'packages/core/src/agents')
-rw-r--r--packages/core/src/agents/loader.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/core/src/agents/loader.ts b/packages/core/src/agents/loader.ts
index ec29983..cf84381 100644
--- a/packages/core/src/agents/loader.ts
+++ b/packages/core/src/agents/loader.ts
@@ -112,6 +112,10 @@ export function saveAgent(agent: AgentDefinition): void {
tomlContent.cwd = agent.cwd;
}
+ if (agent.is_subagent) {
+ tomlContent.is_subagent = true;
+ }
+
// smol-toml handles [[models]] array-of-tables
if (agent.models.length > 0) {
tomlContent.models = agent.models.map((m) => ({
@@ -202,6 +206,7 @@ function loadAgentsFromDir(dir: string, scope: string): AgentDefinition[] {
scope,
slug,
...(typeof parsed.cwd === "string" && parsed.cwd ? { cwd: parsed.cwd } : {}),
+ ...(parsed.is_subagent === true ? { is_subagent: true } : {}),
});
} catch {
// Skip unparseable files