|
@@ -1091,8 +1091,7 @@ export async function runInteractionRequest(params: {
|
|
|
case "chat": {
|
|
case "chat": {
|
|
|
const bookId = request.bookId ?? session.activeBookId;
|
|
const bookId = request.bookId ?? session.activeBookId;
|
|
|
const prompt = request.instruction?.trim().toLowerCase() ?? "";
|
|
const prompt = request.instruction?.trim().toLowerCase() ?? "";
|
|
|
- const isSimpleGreeting = /^(hi|hello|hey|你好|嗨|哈喽)$/i.test(prompt);
|
|
|
|
|
- const toolResult = !isSimpleGreeting && params.tools.chat
|
|
|
|
|
|
|
+ const toolResult = params.tools.chat
|
|
|
? await params.tools.chat(request.instruction ?? "", {
|
|
? await params.tools.chat(request.instruction ?? "", {
|
|
|
bookId,
|
|
bookId,
|
|
|
automationMode: session.automationMode,
|
|
automationMode: session.automationMode,
|