@duanz/pi-d-live 1.1.10 → 1.1.11
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.
- package/index.ts +9 -7
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -948,24 +948,26 @@ export default function piWebLive(pi: ExtensionAPI) {
|
|
|
948
948
|
// 先用规则版即时占位(零延迟),模型算出真正的意图后再把那一行改写掉
|
|
949
949
|
const cmd = event?.args?.command;
|
|
950
950
|
const key = tid || `t${Date.now()}`;
|
|
951
|
-
|
|
952
|
-
|
|
951
|
+
// 空泛兜底(看一眼/查一下)不落行:没实质想法就等模型改写,改不出来就整行不显示
|
|
952
|
+
const human = humanFromSeg(s.seg);
|
|
953
|
+
if (human) emit({ kind: "tool", sid, tid: key, text: human });
|
|
953
954
|
const leak = s.seg || "";
|
|
954
955
|
cmdIntent(ctx, cmd, leak)
|
|
955
956
|
.then((said) => {
|
|
956
|
-
if (said && said !==
|
|
957
|
+
if (said && said !== human) emit({ kind: "tool-intent", sid, tid: key, text: said });
|
|
957
958
|
})
|
|
958
959
|
.catch(() => {});
|
|
959
960
|
return;
|
|
960
961
|
}
|
|
961
962
|
{
|
|
962
963
|
const key = tid || `t${Date.now()}`;
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
964
|
+
// 空泛兜底(看一眼/查一下)不落行:没实质想法就等模型改写,改不出来就整行不显示
|
|
965
|
+
const human = humanFromSeg(s.seg);
|
|
966
|
+
if (human) emit({ kind: "tool", sid, tid: key, text: human });
|
|
967
|
+
// 让模型说清这一步到底在干嘛;改不出来就整行不显示
|
|
966
968
|
toolIntent(ctx, name, event?.args, s.seg || "")
|
|
967
969
|
.then((said) => {
|
|
968
|
-
if (said && said !==
|
|
970
|
+
if (said && said !== human) emit({ kind: "tool-intent", sid, tid: key, text: said });
|
|
969
971
|
})
|
|
970
972
|
.catch(() => {});
|
|
971
973
|
}
|