@cloud411716/fancy-webnovel 0.1.60 → 0.1.61

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 CHANGED
@@ -14,10 +14,14 @@
14
14
  // ---------------------------------------------------------------------------
15
15
 
16
16
  export function notify(session, text) {
17
+ const isHtml = String(text).startsWith('<');
17
18
  queueMicrotask(() => {
18
19
  session.append(
19
20
  'user/message',
20
- { content: [{ type: 'text', text: String(text) }], source: { kind: 'user' } },
21
+ {
22
+ content: [{ type: isHtml ? 'html' : 'text', text: String(text) }],
23
+ source: { kind: 'user' }
24
+ },
21
25
  { surfaceOp: 'append' }
22
26
  );
23
27
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloud411716/fancy-webnovel",
3
- "version": "0.1.60",
3
+ "version": "0.1.61",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "exports": {
@@ -97,9 +97,10 @@ export async function apply(ctx) {
97
97
  const FRAMES = '⠋⠙⠹⠸⠴⠦⠧⠇⠏';
98
98
  let frame = 0;
99
99
  const ticker = setInterval(() => {
100
- notify(session, `⏳ ${FRAMES[frame % FRAMES.length]} 采集中...`);
100
+ const f = FRAMES[frame % FRAMES.length];
101
+ notify(session, `<span class="spin">${f}</span> 采集中...`);
101
102
  frame++;
102
- }, 400);
103
+ }, 80);
103
104
 
104
105
  const proc = spawn('node', [join(SCAN_SCRIPTS_DIR, 'run-scan.js'),
105
106
  '--project-root', projectRoot, '--platform', platform, '--length', length], {