@ynhcj/xiaoyi-channel 0.0.172-beta → 0.0.174-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -570,6 +570,12 @@ export const xiaoyiProvider = {
570
570
  const deviceSection = `\n\n## Current User Device Context\nThe current user is using the following device: ${displayDevice}\nYou need to be aware of the user's current device and provide guidance accordingly. If the response involves device-related tools or actions, you must tailor the reply based on the user's current device, using device-specific references such as "saved to the Notes/Calendar on your {deviceType}.\n"`;
571
571
  context.systemPrompt = (context.systemPrompt ?? "") + deviceSection;
572
572
  }
573
+ // Append current LLM model to systemPrompt
574
+ const currentModelName = getCurrentSessionContext()?.modelName;
575
+ if (currentModelName && currentModelName.trim() !== "" && currentModelName.toLowerCase() !== "none") {
576
+ const modelSection = `\n\n## Current LLM MODEL\n${currentModelName}`;
577
+ context.systemPrompt = (context.systemPrompt ?? "") + modelSection;
578
+ }
573
579
  // ── Trim user message metadata ──────────────────────
574
580
  if (context.messages) {
575
581
  for (const msg of context.messages) {
@@ -410,7 +410,7 @@ export function createXYReplyDispatcher(params) {
410
410
  if (text.length > 0) {
411
411
  // 🔑 检测是否是新一轮思考:当前text比上一次短,或不以上次内容开头
412
412
  const isNewRound = lastReasoningText.length > 0 &&
413
- (text.length < lastReasoningText.length || !text.startsWith(lastReasoningText));
413
+ text.length < lastReasoningText.length;
414
414
  if (isNewRound) {
415
415
  // 将上一轮思考追加到历史
416
416
  accumulatedReasoningHistory += (accumulatedReasoningHistory ? "\n\n" : "") + lastReasoningText;
@@ -21,7 +21,9 @@ c. htmlLocal 是本地HTML文件路径,会先上传获取预览链接再以卡
21
21
 
22
22
  注意事项:
23
23
  a. 操作超时时间为2分钟(120秒),请勿重复调用此工具,如果超时或失败,最多重试一次
24
- b. 最后要把最终的html的公网地址作为工具执行结果返回回去,要以markdown超链接的形式返回给用户`,
24
+ b. 最后要把最终的html的公网地址作为工具执行结果返回回去,要以markdown超链接的形式返回给用户,必须严格保留完整的url,包含url的鉴权鉴权信息,返回给用户的url必须是完整的
25
+ c. html类型的文件回传给用户优先用这个工具,当用户说“生成xxxxhtml然后发我”或者“生成网页游戏烦我”这种表述时使用send_html_card工具
26
+ d. 如果使用这个工具把html文件回传,则生成的html要尽可能适配用户的设备,如果用户使用的是手机,则尽可能生成竖屏的html的预览效果`,
25
27
  parameters: {
26
28
  type: "object",
27
29
  properties: {
@@ -88,8 +90,7 @@ b. 最后要把最终的html的公网地址作为工具执行结果返回回去
88
90
  type: "text",
89
91
  text: JSON.stringify({
90
92
  success: true,
91
- url,
92
- message: "HTML卡片发送成功",
93
+ message: `HTML卡片发送成功,html的在线链接如下,生成markdown超链接时与此url需保持完整一致 ${url}`,
93
94
  }),
94
95
  },
95
96
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ynhcj/xiaoyi-channel",
3
- "version": "0.0.172-beta",
3
+ "version": "0.0.174-beta",
4
4
  "description": "OpenClaw Xiaoyi Channel plugin - Xiaoyi A2A protocol integration",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",