diff --git a/src/agentkit/server/frontend/src/stores/chatStore.ts b/src/agentkit/server/frontend/src/stores/chatStore.ts index e2f3d6f..0b3080b 100644 --- a/src/agentkit/server/frontend/src/stores/chatStore.ts +++ b/src/agentkit/server/frontend/src/stores/chatStore.ts @@ -209,6 +209,9 @@ export const useChatStore = defineStore("chat", () => { // @board meeting (board_started persisted). Frontend uses this // to render the "私董会" badge in the sidebar. is_board: conv.is_board === true, + // Anything returned from the server is already persisted — mark it + // non-local so deleteConversation routes to the server endpoint. + is_local: false, })); } catch (error) { console.error("Failed to load conversations:", error); diff --git a/src/agentkit/server/frontend/src/stores/chatStream.ts b/src/agentkit/server/frontend/src/stores/chatStream.ts index 3909275..f1e1870 100644 --- a/src/agentkit/server/frontend/src/stores/chatStream.ts +++ b/src/agentkit/server/frontend/src/stores/chatStream.ts @@ -1157,6 +1157,17 @@ export function dispatchWsEvent( board_round: 0, }; state.appendMessage(conversationId, startMsg); + // Board meetings are persisted server-side as soon as board_started + // is emitted (portal intercepts and saves the message). Mark the + // conversation non-local so deleteConversation calls the server + // instead of only removing it from the local list — otherwise the + // conversation reappears on the next refresh. + const conv = state.conversations.value.find( + (c) => c.id === conversationId, + ); + if (conv) { + conv.is_local = false; + } } break; }