From d6ec9772769846af7d6217c8c6745776a4e34a95 Mon Sep 17 00:00:00 2001
From: hksdpc255 <43977088+hksdpc255@users.noreply.github.com>
Date: Tue, 17 Mar 2026 09:11:27 +0800
Subject: [PATCH] Add CALL_BEGIN2 for server name parsing
---
common/chat.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/common/chat.cpp b/common/chat.cpp
index 79c4c278e2..6feb59a9e6 100644
--- a/common/chat.cpp
+++ b/common/chat.cpp
@@ -1317,6 +1317,7 @@ static common_chat_params common_chat_params_init_mirothinker(const common_chat_
const std::string SECTION_BEGIN = "";
const std::string SECTION_END = "";
const std::string CALL_BEGIN = "";
+ const std::string CALL_BEGIN2 = "";
const std::string ARGS_BEGIN = "";
const std::string CALL_END = "";
@@ -1339,8 +1340,8 @@ static common_chat_params common_chat_params_init_mirothinker(const common_chat_
// Match: {what_ever}{spaces}{tool_name}
auto tool_parser = p.tool(
p.tool_open(
- p.until("") +
- p.literal("") +
+ p.until(CALL_BEGIN2) +
+ p.literal(CALL_BEGIN2) +
p.space() +
p.literal("") +
p.tool_name(p.literal(name)) +