feat(councils-ui): add on-demand council conversations panel and model config controls
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import type { AgentConfigRegistry } from '../../agents/registry.js';
|
||||
import type { Tool, ToolResult } from '../types.js';
|
||||
import { CouncilsOrchestrator, type CouncilsConfig } from '../../councils/orchestrator.js';
|
||||
import type { CouncilScaffold } from '../../councils/scaffold.js';
|
||||
import { councilRunInputSchema } from '../../councils/types.js';
|
||||
|
||||
interface DelegateRunner {
|
||||
@@ -20,6 +21,7 @@ export interface CouncilRunDeps {
|
||||
registry: AgentConfigRegistry;
|
||||
orchestrator: DelegateRunner;
|
||||
config: CouncilsConfig;
|
||||
scaffold?: CouncilScaffold;
|
||||
}
|
||||
|
||||
export function createCouncilRunTool(deps: CouncilRunDeps): Tool {
|
||||
@@ -48,6 +50,7 @@ export function createCouncilRunTool(deps: CouncilRunDeps): Tool {
|
||||
registry: deps.registry,
|
||||
orchestrator: deps.orchestrator,
|
||||
config: deps.config,
|
||||
scaffold: deps.scaffold,
|
||||
});
|
||||
const result = await runner.run(args);
|
||||
|
||||
@@ -64,11 +67,24 @@ export function createCouncilRunTool(deps: CouncilRunDeps): Tool {
|
||||
`- Secondary: ${result.meta.selected_secondary.join(', ') || 'none'}`,
|
||||
`- Open questions: ${result.meta.open_questions.length}`,
|
||||
`- Next experiments: ${result.meta.next_experiments.length}`,
|
||||
'',
|
||||
`Agent conversations: ${result.conversations.length}`,
|
||||
];
|
||||
|
||||
const conversationLog = result.conversations
|
||||
.map((turn, index) => {
|
||||
const prompt = JSON.stringify(turn.prompt_payload);
|
||||
return [
|
||||
`#${index + 1} ${turn.call_id} [${turn.agent} @ ${turn.tier}]`,
|
||||
`Prompt payload: ${prompt}`,
|
||||
`Response: ${turn.response}`,
|
||||
].join('\n');
|
||||
})
|
||||
.join('\n\n');
|
||||
|
||||
return {
|
||||
success: true,
|
||||
output: `${lines.join('\n')}\n\n${JSON.stringify(result)}`,
|
||||
output: `${lines.join('\n')}\n\n${conversationLog}\n\n${JSON.stringify(result)}`,
|
||||
};
|
||||
} catch (error) {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user