@cloud411716/fancy-webnovel 1.0.21 → 1.0.22
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/infra.js +7 -7
- package/package.json +1 -1
package/infra.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* infra.js — DSH Plugin Core Infrastructure
|
|
3
3
|
*
|
|
4
4
|
* Provides:
|
|
5
|
-
* notify(session, text) — append a user-facing message
|
|
5
|
+
* notify(session, text) — append a user-facing message (LLM-invisible)
|
|
6
6
|
* llmFollowup(invocation,prompt) — hand a prompt to the LLM as a user message
|
|
7
7
|
* StatusLine(session) — in-place updatable status bar via surfaceOp replace
|
|
8
8
|
* scanProgress(ctx, phase, data) — emit structured scan progress events
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
// --------------------------------------------------------------------------
|
|
15
|
-
// notify — append a text message
|
|
15
|
+
// notify — append a text message visible to the user but invisible to LLM
|
|
16
16
|
// --------------------------------------------------------------------------
|
|
17
17
|
|
|
18
18
|
/** Strip ANSI escape sequences from a string (defensive, prevents TTY leak). */
|
|
@@ -25,11 +25,11 @@ function stripAnsi(str) {
|
|
|
25
25
|
* @param {string} text
|
|
26
26
|
*/
|
|
27
27
|
export function notify(session, text) {
|
|
28
|
-
session.append(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
);
|
|
28
|
+
session.append('command/done', {
|
|
29
|
+
commandId: `fancy-notify-${Date.now()}`,
|
|
30
|
+
kind: 'success',
|
|
31
|
+
text: stripAnsi(text),
|
|
32
|
+
});
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
// --------------------------------------------------------------------------
|