summaryrefslogtreecommitdiff
path: root/frontend/src/store
diff options
context:
space:
mode:
authorYurenHao0426 <blackhao0426@gmail.com>2026-02-13 22:46:06 +0000
committerYurenHao0426 <blackhao0426@gmail.com>2026-02-13 22:46:06 +0000
commit2adacdbfa1d1049a0497e55f2b3ed00551bf876f (patch)
tree7bb712d5d85e42aff8b7afe5da56a496ca82d9bd /frontend/src/store
parent77be59bc0a6353e98846b9c9bfa2d566efea8b1f (diff)
Add per-model council settings, Quick Chat council mode, and per-member trace selection
Council members now support individual temperature, reasoning effort, web search, and context trace overrides. Quick Chat inherits council config from the source node and streams through the 3-stage council pipeline. Blueprint loading migrates old string[] council formats to CouncilMemberConfig[]. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'frontend/src/store')
-rw-r--r--frontend/src/store/flowStore.ts24
1 files changed, 21 insertions, 3 deletions
diff --git a/frontend/src/store/flowStore.ts b/frontend/src/store/flowStore.ts
index 944b846..f31720e 100644
--- a/frontend/src/store/flowStore.ts
+++ b/frontend/src/store/flowStore.ts
@@ -73,6 +73,14 @@ export interface MergedTrace {
summarizedContent?: string; // For summary strategy, stores the LLM-generated summary
}
+export interface CouncilMemberConfig {
+ model: string;
+ temperature?: number;
+ reasoningEffort?: 'low' | 'medium' | 'high';
+ enableWebSearch?: boolean;
+ traceId?: string; // Per-member trace selection for council context
+}
+
export interface CouncilData {
stage1: Array<{ model: string; response: string }> | null;
stage2: {
@@ -98,8 +106,8 @@ export interface NodeData {
// Council mode
councilMode?: boolean;
- councilModels?: string[];
- chairmanModel?: string;
+ councilModels?: CouncilMemberConfig[];
+ chairmanModel?: CouncilMemberConfig;
councilData?: CouncilData;
// Traces logic
@@ -1607,8 +1615,18 @@ const useFlowStore = create<FlowState>((set, get) => {
},
loadBlueprint: (doc: BlueprintDocument): ViewportState | undefined => {
+ // Migrate old string[] councilModels to CouncilMemberConfig[]
+ const migratedNodes = (doc.nodes || []).map((n: any) => {
+ if (n.data?.councilModels && n.data.councilModels.length > 0 && typeof n.data.councilModels[0] === 'string') {
+ n.data.councilModels = n.data.councilModels.map((m: string) => ({ model: m }));
+ }
+ if (n.data?.chairmanModel && typeof n.data.chairmanModel === 'string') {
+ n.data.chairmanModel = { model: n.data.chairmanModel };
+ }
+ return n;
+ });
set({
- nodes: (doc.nodes || []) as LLMNode[],
+ nodes: migratedNodes as LLMNode[],
edges: (doc.edges || []) as Edge[],
selectedNodeId: null,
lastViewport: doc.viewport || get().lastViewport,