(...modelFns: (() => { providerID: string; modelID: string } | undefined)[])
| 67 | } |
| 68 | |
| 69 | function getFirstValidModel(...modelFns: (() => { providerID: string; modelID: string } | undefined)[]) { |
| 70 | for (const modelFn of modelFns) { |
| 71 | const model = modelFn() |
| 72 | if (!model) continue |
| 73 | if (isModelValid(model)) return model |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | function createAgent() { |
| 78 | const agents = createMemo(() => sync.data.agent.filter((agent) => agent.mode !== "subagent" && !agent.hidden)) |
no test coverage detected