fix: add subagent default model typing
This commit is contained in:
@@ -703,9 +703,7 @@ describe("runEmbeddedPiAgent", () => {
|
|||||||
).resolves.toBeTruthy();
|
).resolves.toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
it(
|
it("persists the first user message before assistant output", async () => {
|
||||||
"persists the first user message before assistant output",
|
|
||||||
async () => {
|
|
||||||
const agentDir = await fs.mkdtemp(
|
const agentDir = await fs.mkdtemp(
|
||||||
path.join(os.tmpdir(), "clawdbot-agent-"),
|
path.join(os.tmpdir(), "clawdbot-agent-"),
|
||||||
);
|
);
|
||||||
@@ -743,9 +741,7 @@ describe("runEmbeddedPiAgent", () => {
|
|||||||
if (firstAssistantIndex !== -1) {
|
if (firstAssistantIndex !== -1) {
|
||||||
expect(firstUserIndex).toBeLessThan(firstAssistantIndex);
|
expect(firstUserIndex).toBeLessThan(firstAssistantIndex);
|
||||||
}
|
}
|
||||||
},
|
}, 15_000);
|
||||||
15_000,
|
|
||||||
);
|
|
||||||
|
|
||||||
it("persists the user message when prompt fails before assistant output", async () => {
|
it("persists the user message when prompt fails before assistant output", async () => {
|
||||||
const agentDir = await fs.mkdtemp(
|
const agentDir = await fs.mkdtemp(
|
||||||
|
|||||||
@@ -14,9 +14,7 @@ vi.mock("../commands/models.js", async () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe("models cli", () => {
|
describe("models cli", () => {
|
||||||
it(
|
it("registers github-copilot login command", async () => {
|
||||||
"registers github-copilot login command",
|
|
||||||
async () => {
|
|
||||||
const { Command } = await import("commander");
|
const { Command } = await import("commander");
|
||||||
const { registerModelsCli } = await import("./models-cli.js");
|
const { registerModelsCli } = await import("./models-cli.js");
|
||||||
|
|
||||||
@@ -46,7 +44,5 @@ describe("models cli", () => {
|
|||||||
expect.objectContaining({ yes: true }),
|
expect.objectContaining({ yes: true }),
|
||||||
expect.any(Object),
|
expect.any(Object),
|
||||||
);
|
);
|
||||||
},
|
}, 15_000);
|
||||||
15_000,
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1651,6 +1651,8 @@ export type AgentDefaultsConfig = {
|
|||||||
maxConcurrent?: number;
|
maxConcurrent?: number;
|
||||||
/** Auto-archive sub-agent sessions after N minutes (default: 60). */
|
/** Auto-archive sub-agent sessions after N minutes (default: 60). */
|
||||||
archiveAfterMinutes?: number;
|
archiveAfterMinutes?: number;
|
||||||
|
/** Default model selection for spawned sub-agents (string or {primary,fallbacks}). */
|
||||||
|
model?: string | { primary?: string; fallbacks?: string[] };
|
||||||
};
|
};
|
||||||
/** Optional sandbox settings for non-main sessions. */
|
/** Optional sandbox settings for non-main sessions. */
|
||||||
sandbox?: {
|
sandbox?: {
|
||||||
|
|||||||
Reference in New Issue
Block a user