summaryrefslogtreecommitdiff
path: root/frontend/src/store
diff options
context:
space:
mode:
authorYurenHao0426 <blackhao0426@gmail.com>2026-02-13 21:43:34 +0000
committerYurenHao0426 <blackhao0426@gmail.com>2026-02-13 21:43:34 +0000
commit77be59bc0a6353e98846b9c9bfa2d566efea8b1f (patch)
treec0cc008b4705eb50616e6656f8fbc0e5b3475307 /frontend/src/store
parent30921396cb53f61eca90c85d692e0fc06d0f5ff4 (diff)
Add LLM Council mode for multi-model consensus
3-stage council orchestration: parallel model queries (Stage 1), anonymous peer ranking (Stage 2), and streamed chairman synthesis (Stage 3). Includes scope-aware file resolution for Google/Claude providers so upstream file attachments are visible to all providers. - Backend: council.py orchestrator, /api/run_council_stream endpoint, query_model_full() non-streaming wrapper, resolve_provider() helper, resolve_scoped_file_ids() for Google/Claude scope parity with OpenAI - Frontend: council toggle UI, model checkbox selector, chairman picker, SSE event parsing, tabbed Stage 1/2/3 response display - Canvas: amber council node indicator with Users icon Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'frontend/src/store')
-rw-r--r--frontend/src/store/flowStore.ts28
1 files changed, 22 insertions, 6 deletions
diff --git a/frontend/src/store/flowStore.ts b/frontend/src/store/flowStore.ts
index 3590580..944b846 100644
--- a/frontend/src/store/flowStore.ts
+++ b/frontend/src/store/flowStore.ts
@@ -73,6 +73,16 @@ export interface MergedTrace {
summarizedContent?: string; // For summary strategy, stores the LLM-generated summary
}
+export interface CouncilData {
+ stage1: Array<{ model: string; response: string }> | null;
+ stage2: {
+ rankings: Array<{ model: string; ranking: string; parsed_ranking: string[] }>;
+ label_to_model: Record<string, string>;
+ aggregate_rankings: Array<{ model: string; average_rank: number; rankings_count: number }>;
+ } | null;
+ stage3: { model: string; response: string } | null;
+}
+
export interface NodeData {
label: string;
model: string;
@@ -85,22 +95,28 @@ export interface NodeData {
reasoningEffort: 'low' | 'medium' | 'high'; // For OpenAI reasoning models
attachedFileIds?: string[]; // IDs of files attached to this node
disabled?: boolean; // Greyed out, no interaction
-
+
+ // Council mode
+ councilMode?: boolean;
+ councilModels?: string[];
+ chairmanModel?: string;
+ councilData?: CouncilData;
+
// Traces logic
traces: Trace[]; // INCOMING Traces
outgoingTraces: Trace[]; // ALL Outgoing (inherited + self + forks + merged)
forkedTraces: Trace[]; // Manually created forks from "New" handle
mergedTraces: MergedTrace[]; // Merged traces from multiple inputs
- activeTraceIds: string[];
-
- response: string;
+ activeTraceIds: string[];
+
+ response: string;
status: NodeStatus;
inputs: number;
-
+
// Timestamps for merge logic
querySentAt?: number; // Unix timestamp when query was sent
responseReceivedAt?: number; // Unix timestamp when response was received
-
+
[key: string]: any;
}