mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Merge remote-tracking branch 'origin/main' into kennylopez-agent-catalog-sharing
This commit is contained in:
@@ -393,6 +393,25 @@ type E2eConfig = {
|
||||
* spec can interleave edits and exercise the mid-save race handling.
|
||||
*/
|
||||
globalConfigSaveDelayMs?: number;
|
||||
/**
|
||||
* Override the `discover_agent_models` mock response. When set, returns
|
||||
* this catalog instead of the default per-harness model list.
|
||||
*/
|
||||
discoverAgentModels?: {
|
||||
models: Array<{
|
||||
id: string;
|
||||
name: string | null;
|
||||
description?: string | null;
|
||||
}>;
|
||||
supportsSwitching: boolean;
|
||||
agentDefaultModel?: string | null;
|
||||
selectedModel?: string | null;
|
||||
};
|
||||
/**
|
||||
* When set, `discover_agent_models` throws with this message instead of
|
||||
* returning a catalog.
|
||||
*/
|
||||
discoverAgentModelsError?: string;
|
||||
};
|
||||
relayHttpUrl?: string;
|
||||
relayWsUrl?: string;
|
||||
@@ -10136,6 +10155,25 @@ export function maybeInstallE2eTauriMocks() {
|
||||
supportsSwitching: false,
|
||||
};
|
||||
case "discover_agent_models": {
|
||||
const discoverError = activeConfig?.mock?.discoverAgentModelsError;
|
||||
if (discoverError) {
|
||||
throw new Error(discoverError);
|
||||
}
|
||||
const discoverOverride = activeConfig?.mock?.discoverAgentModels;
|
||||
if (discoverOverride) {
|
||||
return {
|
||||
agentName: "mock-agent",
|
||||
agentVersion: "0.0.0",
|
||||
models: discoverOverride.models.map((model) => ({
|
||||
id: model.id,
|
||||
name: model.name,
|
||||
description: model.description ?? null,
|
||||
})),
|
||||
agentDefaultModel: discoverOverride.agentDefaultModel ?? null,
|
||||
selectedModel: discoverOverride.selectedModel ?? null,
|
||||
supportsSwitching: discoverOverride.supportsSwitching,
|
||||
};
|
||||
}
|
||||
const input = (
|
||||
payload as {
|
||||
input?: { agentCommand?: string; provider?: string };
|
||||
|
||||
Reference in New Issue
Block a user