feat: implemented confirmation mechanism for tool invokation

This commit is contained in:
Xiaohan-Tian
2026-06-03 17:05:42 -07:00
parent 414565ecc9
commit ad1e0c2aa8
23 changed files with 860 additions and 84 deletions
+12
View File
@@ -123,6 +123,7 @@ interface ProjectState {
// ChatBox state
showChatBox: boolean;
toolFastForwardEnabled: boolean;
// K.G.One panel state
showKGOnePanel: boolean;
@@ -227,6 +228,8 @@ interface ProjectState {
// ChatBox actions
setShowChatBox: (show: boolean) => void;
toggleChatBox: () => void;
setToolFastForwardEnabled: (enabled: boolean) => void;
toggleToolFastForwardEnabled: () => void;
// K.G.One panel actions
toggleKGOnePanel: () => void;
@@ -466,6 +469,7 @@ export const useProjectStore = create<ProjectState>((set, get) => {
// Initial ChatBox state
showChatBox: initialChatBoxState,
toolFastForwardEnabled: false,
// Initial K.G.One panel state
showKGOnePanel: false,
@@ -1740,6 +1744,14 @@ export const useProjectStore = create<ProjectState>((set, get) => {
set({ showChatBox: false });
},
setToolFastForwardEnabled: (enabled: boolean) => {
set({ toolFastForwardEnabled: enabled });
},
toggleToolFastForwardEnabled: () => {
set((state) => ({ toolFastForwardEnabled: !state.toolFastForwardEnabled }));
},
toggleKGOnePanel: () => {
const { showKGOnePanel, showSettings } = get();
if (showSettings || !showKGOnePanel) {