Skip to content

Commit ca3074d

Browse files
committed
fix: set default toolChoice to "auto" in app store and remove unnecessary logging in chat route
1 parent 7060dcc commit ca3074d

3 files changed

Lines changed: 1 addition & 3 deletions

File tree

src/app/api/chat/route.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ export async function POST(request: Request) {
117117
return createDataStreamResponse({
118118
execute: async (dataStream) => {
119119
const manualToolPart = extractMenualToolInvocationPart(message);
120-
console.log({ manualToolPart });
121120

122121
if (toolChoice == "manual" && manualToolPart) {
123122
const toolResult = await manualToolExecute(manualToolPart);

src/app/store.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const appStore = create<AppState & AppDispatch>()(
4040
name: "mc-app-store",
4141
partialize: (state) => ({
4242
model: state.model || DEFAULT_MODEL,
43-
toolChoice: state.toolChoice,
43+
toolChoice: state.toolChoice || "auto",
4444
}),
4545
},
4646
),

src/components/chat-bot.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ export default function ChatBot({
147147
behavior: "smooth",
148148
});
149149
}
150-
appStoreMutate({ toolChoice: "manual" });
151150
}, [status]);
152151

153152
return (

0 commit comments

Comments
 (0)