feat(quick-pane): refine spotlight workflow
This commit is contained in:
@@ -1205,6 +1205,16 @@ export function createAgentRegistry({
|
||||
if (!runtime.ephemeral) throw new Error("runtime is not a quick runtime");
|
||||
return closeRuntime(runtimeId);
|
||||
},
|
||||
async getModelCatalog() {
|
||||
const runtime = [...runtimesByAgentId.values()].find(
|
||||
(candidate) => candidate.adapter,
|
||||
);
|
||||
if (!runtime?.adapter) return [];
|
||||
const response = await enqueue(runtime, () =>
|
||||
runtime.adapter.send({ type: "get_available_models" }),
|
||||
);
|
||||
return response?.data?.models ?? [];
|
||||
},
|
||||
listAgents() {
|
||||
return [...runtimesByAgentId.values()]
|
||||
.map(publicAgent)
|
||||
|
||||
Reference in New Issue
Block a user