@telosmaylx/dsh-session-notify 0.1.12 → 0.1.13

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/README.en.md CHANGED
@@ -13,7 +13,7 @@
13
13
  [![DSH](https://img.shields.io/badge/DSH-Web%20Profile-4D6BFE)](https://www.npmjs.com/package/@telosmaylx/dsh-session-notify)
14
14
  [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/TelosmaYLX/dsh-session-notify/pulls)
15
15
 
16
- At the end of every conversation turn, writes "completed / errored / blocked / hit the cap" along with duration and token usage into the session log, and pushes a browser system notification and an in-page toast. Built-in 5 languages, a visual copy-template editor, and a custom preset library; cache hit rate and generation speed come from the official projections, consistent with the status bar.
16
+ At the end of every conversation turn, writes "completed / errored / blocked / hit the cap" along with duration and token usage into the session log, and pushes a browser system notification and an in-page toast. Built-in 5 languages, 4 style presets (kaomoji / Felyne / Neko girl / DeepSeek-chan), a visual copy-template editor, and a custom preset library; cache hit rate and generation speed come from the official projections, consistent with the status bar.
17
17
 
18
18
  </div>
19
19
 
@@ -66,7 +66,7 @@ At the end of every conversation turn, writes "completed / errored / blocked / h
66
66
 
67
67
  - **5 languages**: Simplified Chinese, Traditional Chinese, English, Japanese, Korean — the notification copy, the duration and usage wording, and the settings panel UI all switch with the language (instant re-render on switch).
68
68
  - **Visual template editor** (Chip editor): dynamic information renders as inline chips (placeholder code never leaks); "+ Insert Info" inserts at the cursor (can be inserted mid-text); clicking a chip removes it; each field has a live preview (information flows into the body with sample values).
69
- - **Preset system**: the built-in "Default" preset serves as the baseline; the current configuration can be saved as a custom preset (persisted in `localStorage`), supports auto-numbered unnamed presets (`Untitled`, `Untitled 2`…), a "From: xxx · Modified" origin indicator, and deleting presets.
69
+ - **Preset system**: a built-in "Default" baseline plus 4 one-click style presets (kaomoji / Felyne / Neko girl / DeepSeek-chan — a full set of stylized titles and per-reason copy); the current configuration can be saved as a custom preset (persisted in `localStorage`), supports auto-numbered unnamed presets (`Untitled`, `Untitled 2`…), a "From: xxx · Modified" origin indicator, and deleting presets.
70
70
  - **Push title template**: when left empty, each reason uses a default title (completed = task completed / errored = task errored / …); `{title}` references the session title.
71
71
 
72
72
  ### Same Source as the Official Metrics
@@ -76,7 +76,7 @@ At the end of every conversation turn, writes "completed / errored / blocked / h
76
76
  - Both are fully consistent with the dsh-web-ui status bar, excluding queuing, preparation and tool time; when the projection is unavailable or the data is not ready, it automatically falls back to a local usage-aggregation estimate.
77
77
 
78
78
  > [!NOTE]
79
- > The cache hit rate and speed are only shown when inserted via the `{cache}` and `{tps}` placeholders in a custom template. With the built-in default copy, the body contains only duration and usage.
79
+ > The cache hit rate and speed are only shown when inserted via the `{cache}` and `{tps}` placeholders in a custom template. With the built-in default copy, the body does NOT include duration and usage (insert the placeholders in a custom template to show them).
80
80
 
81
81
  ### Engineering Quality
82
82
 
@@ -232,31 +232,19 @@ When the client observes a `running: true → false` edge in the session list, i
232
232
 
233
233
  ### Notification Examples
234
234
 
235
- All of the following are actually generated by `buildNotice` in `lib/core.js`. The default copy uses **differentiated phrasing** per end reason (not uniform sentence patterns):
236
-
237
- Simplified Chinese default copy:
238
-
239
- ```text
240
- 会话「重构登录模块」已完成(用时 3 25 秒,消耗 12,400 输入 / 35,600 输出)。完成:括号紧凑式 + 内嵌会话标题
241
- 会话「重构登录模块」已中止。用时 3 25 秒,消耗 12,400 输入 / 35,600 输出。中止:句号拆句
242
- 会话「重构登录模块」被阻塞。用时 3 25 秒,消耗 12,400 输入 / 35,600 输出。阻塞:句号拆句
243
- 会话「重构登录模块」达到输出上限。用时 3 25 秒,消耗 12,400 输入 / 35,600 输出,建议拆分任务后重试。 上限:附建议
244
- ```
245
-
246
- > When the session has no title (`titleValue` empty), it automatically falls back to a phrasing without the title, e.g. "Session completed (took …)".
247
-
248
- On error, the error details come first (single-lined, truncated past 40 characters):
249
-
250
- ```text
251
- 会话「重构登录模块」出错:connection timeout(用时 12 秒)。
252
- ```
253
-
254
- English default copy (session title in double quotes):
255
-
256
- ```text
257
- Session "重构登录模块" completed (took 3m25s, used 12,400 in / 35,600 out).
258
- Session "重构登录模块" hit the output-token cap. Took 3m25s, used 12,400 in / 35,600 out — consider splitting the task.
259
- ```
235
+ All of the following are actually generated by `buildNotice` in `lib/core.js`. The default copy is uniform "Session \"{title}\" <state>. Click to view." (wording varies per end reason; **duration and usage are not included**):
236
+
237
+ English default copy (session title in double quotes):
238
+
239
+ ```text
240
+ Session "重构登录模块" completed. Click to view.completed
241
+ Session "重构登录模块" aborted. Click to view.aborted
242
+ Session "重构登录模块" blocked. Click to view.blocked
243
+ Session "重构登录模块" hit the cap. Click to view.hit the cap
244
+ Session "重构登录模块" failed. Click to view. ← errored
245
+ ```
246
+
247
+ > When the session has no title (`titleValue` empty), it falls back to "Session completed. Click to view."; duration / usage / cache hit / speed only appear in custom templates via the `{duration}` `{usage}` `{cache}` `{tps}` placeholders.
260
248
 
261
249
  Custom template (edited in the settings panel; this example uses all info slots):
262
250
 
@@ -338,7 +326,7 @@ Each end reason has its own template input; **the token is the switch** — the
338
326
  | `{icon}` | Custom notification-icon switch: insert via "+ Insert info → Icon" and pick a local file (auto-compressed to 128×128 square), independent per reason; stripped from the rendered body, never written into the session log; takes precedence over the global "Notification icon"; removing the token also clears that reason's icon data | — |
339
327
  | `{label}` | Deprecated — automatically stripped at render time; old templates remain compatible (the option has been removed from the insert menu) | — |
340
328
 
341
- An empty template uses the built-in default copy (automatically includes duration and usage). The collapsible row's `summary` shares the same source as the body (the rendered result is truncated to 120 characters) — users who only look at the collapsible row still see the real title, duration and usage.
329
+ An empty template uses the built-in default copy (the uniform "Session "{title}" <state>. Click to view." phrasing; duration and usage are not included). The collapsible row's `summary` shares the same source as the body (the rendered result is truncated to 120 characters) — users who only look at the collapsible row still see the real title, duration and usage.
342
330
 
343
331
  ### Preset System
344
332
 
@@ -521,7 +509,7 @@ Both the summary line (collapsible row) and error details are single-lined and t
521
509
  <details>
522
510
  <summary><b>Can I customize the icon or sound of system notifications?</b></summary>
523
511
 
524
- The current version uses the browser's default notification style and does not inject a custom icon or sound; the toast is a fixed dark card. If you need these capabilities, feel free to open an Issue or PR.
512
+ The **icon is customizable**: in the settings panel's "Notification image" section you can upload a hero image and an icon (global), or insert the `{icon}` tag in a per-reason template to assign a per-reason icon (takes precedence over the global one). **Sound** is not customizable (the system/browser default is used); the toast is a fixed dark card. For other needs, feel free to open an Issue or PR.
525
513
 
526
514
  </details>
527
515
 
@@ -549,8 +537,9 @@ The "Notification Permissions" area of the settings panel shows the current stat
549
537
 
550
538
  | Version | Date | Changes |
551
539
  | --- | --- | --- |
540
+ | **0.1.13** | 2026-08-29 | Added **4 one-click style presets** (kaomoji / Felyne / Neko girl / DeepSeek-chan — a full set of stylized copy for the title + all 5 reasons, **available in 5 languages**, loading never forces a UI-language switch); cleaned the obsolete old template names (playful/formal/detail) out of the preset dropdown; README default-copy examples synced to the "Session \"{title}\" <state>. Click to view." phrasing (duration and usage not included) |
552
541
  | **0.1.12** | 2026-08-29 | packaging cleanup: removed the temporary audit script that had been packed into scripts |
553
- | **0.1.11** | 2026-08-29 | New **custom notification media**: ① the template "+ Insert info" menu gains an **Image** token — insert `{image}` and pick a local file (**auto-compressed to 512px wide with a 16:9 center crop matching the notification display ratio**, shown as a thumbnail chip in the editor), uploaded per reason and stored in the settings document (stripped from the rendered body, never written into the session log); ② **notification image/icon are now upload cards** (empty = a rounded "+" tile, click to upload; **image 512×288 with a 16:9 center crop, icon 128×128 with a 1:1 square center crop**; once uploaded the card shows the thumbnail with a "×" at the top-right to remove it) — the crop guarantees the uploaded image appears complete in the notification card instead of being hard-cropped by the system's display area; ③ the **push-title "+ Insert info"** inserts any info token (session title / duration / usage / cache hit / speed), not just the title; the "Notification media" area in the settings panel now shows a **processing guide** (crop ratios) and a **thumbnail preview** after upload; ④ **per-reason notification icons** (insert the `{icon}` token in a template + local upload, 128×128 square, takes precedence over the global icon); ⑤ **removing an `{image}`/`{icon}` token clears that reason's image/icon data**; ⑥ **layout polish: "Body templates × 5" is now a collapsible section (collapsed by default to keep the panel compact, with a customized-count hint in the header, click to expand)**; ⑦ **layout polish ②: the notification image/icon upload cards sit side by side in one row; the push title and per-reason titles merge into a "Title" collapsible section (collapsed by default); collapse indicators now use triangle icons (the "Expand/Collapse" texts removed, reducing i18n burden)**; ⑧ **interaction polish: the push title is now a Chip editor (inserted info shows as chip tags instead of raw `{title}` codes); the image/icon cards are reordered (icon first); "Body templates × 5" renamed to "Content"; image/icon thumbnails open a fullscreen lightbox preview on click, and only the "×" removes a tag (no accidental removal)**; ⑨ **previews unified to the full original: upload now stores both the cropped version (for the notification) and an aspect-preserving full version (1024px, used by the lightbox), so card and chip previews both show the uncropped image; the collapse triangle icons are enlarged**; ⑩ **title info-token fix: `{duration}` `{usage}` `{error}` `{cache}` `{tps}` in the notification title are replaced with the session's real values, never leaking raw codes (chips in the editor, real data when sent); "Content" rows are now single-line (reason label + editor + a "+/−" insert button + a paper-plane send button)**; ⑪ **details: the live preview under each Content row is removed (more compact); the Content editors use a tighter padding (compact); the "+/−" and paper-plane buttons now have rectangular borders and are vertically centered**; ⑫ **deletion-experience fix: clearing a Content editor no longer restores the default text (it shows the placeholder hint instead), and the caret returns to the end after clearing — holding Backspace now deletes continuously; "+/−" now use SVG stroke icons (exactly centered in the button); the paper-plane icon is rotated 30° counterclockwise**; ⑬ **placeholder & default text: with an empty template (default preset) the editor directly shows the default text (what you see is what gets pushed); after editing, clearing shows the "leave empty to use the default text" placeholder — implemented with a CSS pseudo-element (behaves like a native input placeholder: non-selectable, non-deletable), replacing the previously copyable placeholder text**; ⑭ **details ②: the push-title placeholder now reads "Generic push title; leave empty to use the default title (per-reason titles below take precedence)"; clicking an empty editor moves the caret to the very start (typed text begins at the leftmost position, like a native placeholder); the paper-plane icon is rotated another 30° counterclockwise (60° total); the Content reason labels are now auto-width (editor hugs the label text); editor heights are unified (box-sizing border-box + min-height 38px, matching the plain inputs)**; ⑮ **details ③: the reason labels are back to a fixed 70px width (Content and per-reason titles aligned); Backspace/Delete on a chip is now handled manually so the caret stays at the deletion point (no more jumping to the start); the send button icon is now a bell (push/notification semantics); custom presets now also save the notification image/icon (including the full preview versions), the default preset stays empty**; ⑯ **details ④: the image/icon upload cards are now equal height (64px; the 16:9 image is 114px wide); the reason labels shrink from 70px to 60px; the send button icon changed from a bell to a rightward push arrow; the "Title" and "Content" collapsible headers are bold**; ⑰ **default text & labels: max-tokens is now uniformly shown as "Cap" (label / default title / placeholder, synced in all 5 languages); the per-reason default body is now "Session "{title}" completed. Click to view." (5 languages, editor hint and host rendering in sync); the per-reason title rows each gain a "+" insert button (like the push title: info tokens only, no image/icon, inserted at the caret)**; ⑱ **chips & preset management: the per-reason titles are now Chip editors (inserted info shows as chip tags instead of raw {title} codes; {image}{icon} are blocked — typed literally they stay as text and are stripped when sent); custom presets gain a "Rename" action (appears when a custom preset is selected; the dropdown and the active preset sync after renaming)**; ⑲ **details ⑤: Chip editor text is now vertically centered (line-height and chips unified to 20px, 9px vertical padding — single-line text sits centered in the 38px box); the "Title" and "Content" fold bars now have a filled background for contrast (rounded tinted bar as header, expanded body indented with a left border line); full audit of all 86 i18n keys across the 5 languages (all translated — tweaked zh-TW "Rename" and ko "Discard")**; the "Send" test buttons apply them too; effective on the system-notification channel only (the in-page toast is a text card); ⑳ **details ⑥: the filled background of the "Title" / "Content" fold headers is removed; the placeholder text color is now rgba(127,127,127,0.5) (lighter, no longer affected by the theme variable)**; the "Send" test buttons apply them too; effective on the system-notification channel only (the in-page toast is a text card); ㉑ **fix: the divider lines between the per-reason rows under Content are removed; when Content is expanded, the line under the header is now present and spans the full width, matching Title; Backspace/Delete on a chip no longer jumps the caret to the start (inside the element container the chip is located by child-node index, covering the caret-right-after-chip and editor-end cases); renaming an unnamed preset upgrades it to a named preset (new id) so the dropdown shows the new name immediately**; the "Send" test buttons apply them too; effective on the system-notification channel only (the in-page toast is a text card); ㉒ **fix: the placeholder hint no longer lingers after typing (the placeholder CSS selector is now aligned with the state attribute — it disappears as you type and text starts at the left); uploading/removing an image or icon keeps the caret in place instead of jumping to the start (the caret offset is saved before the DOM rebuild and restored after); the preset dropdown no longer shows a white focus/selected outline**; the "Send" test buttons apply them too; effective on the system-notification channel only (the in-page toast is a text card); ㉓ **fix: deleting a chip (including image/icon) no longer moves or hides the caret, so backspace-deleting is continuous — the rebuild triggered by image-data changes is now on-demand (skipped when the DOM no longer contains that media chip and the template has no such tag, keeping the caret at the deletion point; only uploads/replacements that need a thumbnail refresh trigger a rebuild), and the caret-offset math was fixed (a chip counts as exactly one position, never walking into its inner text)**; the "Send" test buttons apply them too; effective on the system-notification channel only (the in-page toast is a text card) |
542
+ | **0.1.11** | 2026-08-29 | New **custom notification media**: ① the template "+ Insert info" menu gains an **Image** token — insert `{image}` and pick a local file (**auto-compressed to 512px wide with a 16:9 center crop matching the notification display ratio**, shown as a thumbnail chip in the editor), uploaded per reason and stored in the settings document (stripped from the rendered body, never written into the session log); ② **notification image/icon are now upload cards** (empty = a rounded "+" tile, click to upload; **image 512×288 with a 16:9 center crop, icon 128×128 with a 1:1 square center crop**; once uploaded the card shows the thumbnail with a "×" at the top-right to remove it) — the crop guarantees the uploaded image appears complete in the notification card instead of being hard-cropped by the system's display area; ③ the **push-title "+ Insert info"** inserts any info token (session title / duration / usage / cache hit / speed), not just the title; the "Notification media" area in the settings panel now shows a **processing guide** (crop ratios) and a **thumbnail preview** after upload; ④ **per-reason notification icons** (insert the `{icon}` token in a template + local upload, 128×128 square, takes precedence over the global icon); ⑤ **removing an `{image}`/`{icon}` token clears that reason's image/icon data**; ⑥ **layout polish: "Body templates × 5" is now a collapsible section (collapsed by default to keep the panel compact, with a customized-count hint in the header, click to expand)**; ⑦ **layout polish ②: the notification image/icon upload cards sit side by side in one row; the push title and per-reason titles merge into a "Title" collapsible section (collapsed by default); collapse indicators now use triangle icons (the "Expand/Collapse" texts removed, reducing i18n burden)**; ⑧ **interaction polish: the push title is now a Chip editor (inserted info shows as chip tags instead of raw `{title}` codes); the image/icon cards are reordered (icon first); "Body templates × 5" renamed to "Content"; image/icon thumbnails open a fullscreen lightbox preview on click, and only the "×" removes a tag (no accidental removal)**; ⑨ **previews unified to the full original: upload now stores both the cropped version (for the notification) and an aspect-preserving full version (1024px, used by the lightbox), so card and chip previews both show the uncropped image; the collapse triangle icons are enlarged**; ⑩ **title info-token fix: `{duration}` `{usage}` `{error}` `{cache}` `{tps}` in the notification title are replaced with the session's real values, never leaking raw codes (chips in the editor, real data when sent); "Content" rows are now single-line (reason label + editor + a "+/−" insert button + a paper-plane send button)**; ⑪ **details: the live preview under each Content row is removed (more compact); the Content editors use a tighter padding (compact); the "+/−" and paper-plane buttons now have rectangular borders and are vertically centered**; ⑫ **deletion-experience fix: clearing a Content editor no longer restores the default text (it shows the placeholder hint instead), and the caret returns to the end after clearing — holding Backspace now deletes continuously; "+/−" now use SVG stroke icons (exactly centered in the button); the paper-plane icon is rotated 30° counterclockwise**; ⑬ **placeholder & default text: with an empty template (default preset) the editor directly shows the default text (what you see is what gets pushed); after editing, clearing shows the "leave empty to use the default text" placeholder — implemented with a CSS pseudo-element (behaves like a native input placeholder: non-selectable, non-deletable), replacing the previously copyable placeholder text**; ⑭ **details ②: the push-title placeholder now reads "Generic push title; leave empty to use the default title (per-reason titles below take precedence)"; clicking an empty editor moves the caret to the very start (typed text begins at the leftmost position, like a native placeholder); the paper-plane icon is rotated another 30° counterclockwise (60° total); the Content reason labels are now auto-width (editor hugs the label text); editor heights are unified (box-sizing border-box + min-height 38px, matching the plain inputs)**; ⑮ **details ③: the reason labels are back to a fixed 70px width (Content and per-reason titles aligned); Backspace/Delete on a chip is now handled manually so the caret stays at the deletion point (no more jumping to the start); the send button icon is now a bell (push/notification semantics); custom presets now also save the notification image/icon (including the full preview versions), the default preset stays empty**; ⑯ **details ④: the image/icon upload cards are now equal height (64px; the 16:9 image is 114px wide); the reason labels shrink from 70px to 60px; the send button icon changed from a bell to a rightward push arrow; the "Title" and "Content" collapsible headers are bold**; ⑰ **default text & labels: max-tokens is now uniformly shown as "Cap" (label / default title / placeholder, synced in all 5 languages); the per-reason default body is now "Session "{title}" completed. Click to view." (5 languages, editor hint and host rendering in sync); the per-reason title rows each gain a "+" insert button (like the push title: info tokens only, no image/icon, inserted at the caret)**; ⑱ **chips & preset management: the per-reason titles are now Chip editors (inserted info shows as chip tags instead of raw {title} codes; {image}{icon} are blocked — typed literally they stay as text and are stripped when sent); custom presets gain a "Rename" action (appears when a custom preset is selected; the dropdown and the active preset sync after renaming)**; ⑲ **details ⑤: Chip editor text is now vertically centered (line-height and chips unified to 20px, 9px vertical padding — single-line text sits centered in the 38px box); the "Title" and "Content" fold bars now have a filled background for contrast (rounded tinted bar as header, expanded body indented with a left border line); full audit of all 86 i18n keys across the 5 languages (all translated — tweaked zh-TW "Rename" and ko "Discard")**; the "Send" test buttons apply them too; effective on the system-notification channel only (the in-page toast is a text card); ⑳ **details ⑥: the filled background of the "Title" / "Content" fold headers is removed; the placeholder text color is now rgba(127,127,127,0.5) (lighter, no longer affected by the theme variable)**; the "Send" test buttons apply them too; effective on the system-notification channel only (the in-page toast is a text card); ㉑ **fix: the divider lines between the per-reason rows under Content are removed; when Content is expanded, the line under the header is now present and spans the full width, matching Title; Backspace/Delete on a chip no longer jumps the caret to the start (inside the element container the chip is located by child-node index, covering the caret-right-after-chip and editor-end cases); renaming an unnamed preset upgrades it to a named preset (new id) so the dropdown shows the new name immediately**; the "Send" test buttons apply them too; effective on the system-notification channel only (the in-page toast is a text card); ㉒ **fix: the placeholder hint no longer lingers after typing (the placeholder CSS selector is now aligned with the state attribute — it disappears as you type and text starts at the left); uploading/removing an image or icon keeps the caret in place instead of jumping to the start (the caret offset is saved before the DOM rebuild and restored after); the preset dropdown no longer shows a white focus/selected outline**; the "Send" test buttons apply them too; effective on the system-notification channel only (the in-page toast is a text card); ㉓ **fix: deleting a chip (including image/icon) no longer moves or hides the caret, so backspace-deleting is continuous — the rebuild triggered by image-data changes is now on-demand (skipped when the DOM no longer contains that media chip and the template has no such tag, keeping the caret at the deletion point; only uploads/replacements that need a thumbnail refresh trigger a rebuild), and the caret-offset math was fixed (a chip counts as exactly one position, never walking into its inner text)**; the "Send" test buttons apply them too; effective on the system-notification channel only (the in-page toast is a text card) |
554
543
  | **0.1.10** | 2026-08-29 | "Push title" changed to a native input (native placeholder behavior: not copyable, disappears when typing, restores when cleared; "+ Session Title" inserts `{title}` at the cursor); docs add the QQ Browser built-in push popup explanation (actual behavior of the three push modes + the send button tests follow the same rule) |
555
544
  | **0.1.9** | 2026-08-29 | Push titles now support **per-reason customization** (collapsible UI, collapsed by default to stay lean; when empty, each reason uses a differentiated default title: task completed / task errored / task aborted / task blocked / task hit the output cap, in 5 languages); the projection upgraded to an object (kind/text/title) carrying the host-rendered title; the reset button **keeps the current language**; the default copy embeds the "session title" token (Session "{title}" completed, auto-falls back when there's no title); settings-panel template previews sync; "+ Insert Info" no longer auto-collapses after inserting a token; deleting a custom preset currently in use automatically switches back to the default; template preview fixed (doesn't hide on click, hides only when typing, restores when cleared); each reason gains a "Send" button (one-click test notification rendered with the current template) |
556
545
  | **0.1.8** | 2026-08-29 | Default push title changed to "Task completed" (`{title}` can still reference the session title); default copy is differentiated per end reason (completed = compact parentheses / aborted·blocked = separate sentences / errored = error first / cap = with a suggestion, in 5 languages); the settings panel gains a "Reset" button for one-click restore of defaults |
package/README.ja.md CHANGED
@@ -13,7 +13,7 @@
13
13
  [![DSH](https://img.shields.io/badge/DSH-Web%20Profile-4D6BFE)](https://www.npmjs.com/package/@telosmaylx/dsh-session-notify)
14
14
  [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/TelosmaYLX/dsh-session-notify/pulls)
15
15
 
16
- 各ターンの会話終了時に、「完了 / エラー / ブロック / 上限到達」を所要時間・トークン消費とともにセッションログへ書き込み、ブラウザのシステム通知とページ内トーストをプッシュします。5 言語、ビジュアルなメッセージテンプレートエディタ、カスタムプリセットライブラリを内蔵。キャッシュヒット率と生成速度は公式プロジェクションから取得し、ステータスバーと同じ口径です。
16
+ 各ターンの会話終了時に、「完了 / エラー / ブロック / 上限到達」を所要時間・トークン消費とともにセッションログへ書き込み、ブラウザのシステム通知とページ内トーストをプッシュします。5 言語、4 つのスタイルプリセット(顔文字 / アイルー / ネコ娘 / DeepSeekちゃん)、ビジュアルなメッセージテンプレートエディタ、カスタムプリセットライブラリを内蔵。キャッシュヒット率と生成速度は公式プロジェクションから取得し、ステータスバーと同じ口径です。
17
17
 
18
18
  </div>
19
19
 
@@ -66,7 +66,7 @@
66
66
 
67
67
  - **5 言語**:簡体中文、繁體中文、English、日本語、한국어 —— 通知メッセージ、所要時間・消費量の表現、設定パネルの UI がすべて言語に応じて切り替わります(切り替え時に即再レンダリング)。
68
68
  - **ビジュアルテンプレートエディタ**(Chip カプセルエディタ):動的情報をインラインカプセルとしてレンダリング(プレースホルダーコードは露出しません)。「+ 情報を挿入」でカーソル位置に挿入(テキストの途中にも挿入可)、カプセルをクリックで削除、各欄にリアルタイムプレビュー(情報がサンプル値として本文に流れ込みます)。
69
- - **プリセットシステム**:「デフォルト」プリセットをベースラインとして内蔵。現在の設定をカスタムプリセットとして保存可能(`localStorage` に永続化)。自動採番される無名プリセット(`未命名`、`未命名 2`…)、「出自:xxx · 変更あり」の出所表示、プリセット削除に対応。
69
+ - **プリセットシステム**:「デフォルト」ベースライン + ワンクリックのスタイルプリセット 4 種(顔文字 / アイルー / ネコ娘 / DeepSeekちゃん——タイトルと 5 理由の文面一式をスタイル化)。現在の設定をカスタムプリセットとして保存可能(`localStorage` に永続化)。自動採番される無名プリセット(`未命名`、`未命名 2`…)、「出自:xxx · 変更あり」の出所表示、プリセット削除に対応。
70
70
  - **プッシュタイトルテンプレート**:空欄の場合は各理由でデフォルトタイトルを使用(完了=タスク完了 / エラー=タスクエラー / …)。`{title}` はセッションタイトルを参照します。
71
71
 
72
72
  ### 公式の口径と同じソース
@@ -76,7 +76,7 @@
76
76
  - どちらも dsh-web-ui のステータスバーと完全に同じ口径で、待機・準備・ツール実行時間は含みません。プロジェクションが利用不可、またはデータが未準備の場合は、ローカルの使用量集計による推定に自動フォールバックします。
77
77
 
78
78
  > [!NOTE]
79
- > キャッシュヒット率と速度は、カスタムテンプレートで `{cache}`、`{tps}` プレースホルダーを挿入した場合にのみ表示されます。内蔵デフォルトメッセージを使用する場合、本文には所要時間と消費量のみが含まれます。
79
+ > キャッシュヒット率と速度は、カスタムテンプレートで `{cache}`、`{tps}` プレースホルダーを挿入した場合にのみ表示されます。内蔵デフォルトメッセージを使用する場合、本文には所要時間と消費量は含まれません(表示するにはカスタムテンプレートでプレースホルダーを挿入してください)。
80
80
 
81
81
  ### エンジニアリング品質
82
82
 
@@ -232,31 +232,19 @@ dsh plugin --profile web remove @telosmaylx/dsh-session-notify
232
232
 
233
233
  ### 通知の例
234
234
 
235
- 以下はすべて `lib/core.js` の `buildNotice` が実際に生成したものです。デフォルトメッセージは終了理由ごとに**表現を変えています**(画一的な構文ではありません):
236
-
237
- 簡体中文のデフォルトメッセージ:
238
-
239
- ```text
240
- 会话「重构登录模块」已完成(用时 3 分 25 秒,消耗 12,400 输入 / 35,600 输出)。 完成:括号紧凑式 + 内嵌会话标题
241
- 会话「重构登录模块」已中止。用时 3 分 25 秒,消耗 12,400 输入 / 35,600 输出。 中止:句号拆句
242
- 会话「重构登录模块」被阻塞。用时 3 分 25 秒,消耗 12,400 输入 / 35,600 输出。 阻塞:句号拆句
243
- 会话「重构登录模块」达到输出上限。用时 3 分 25 秒,消耗 12,400 输入 / 35,600 输出,建议拆分任务后重试。 上限:附建议
244
- ```
245
-
246
- > セッションにタイトルがない(`titleValue` が空)場合は、タイトルなしの構文に自動フォールバックします。例:「セッション完了(所要時間 …)」。
247
-
248
- エラー時はエラー詳細を前に置きます(単行化、40 文字超は切り詰め):
249
-
250
- ```text
251
- 会话「重构登录模块」出错:connection timeout(用时 12 秒)。
252
- ```
253
-
254
- English のデフォルトメッセージ(セッションタイトルは二重引用符):
255
-
256
- ```text
257
- Session "重构登录模块" completed (took 3m25s, used 12,400 in / 35,600 out).
258
- Session "重构登录模块" hit the output-token cap. Took 3m25s, used 12,400 in / 35,600 out — consider splitting the task.
259
- ```
235
+ 以下はすべて `lib/core.js` の `buildNotice` が実際に生成したものです。デフォルトメッセージは「セッション「{title}」〇〇。クリックして表示。」の形で統一(終了理由によって語彙が異なります。**所要時間・消費は含みません**):
236
+
237
+ 日本語デフォルトメッセージ:
238
+
239
+ ```text
240
+ セッション「重构登录模块」完了。クリックして表示。 完了
241
+ セッション「重构登录模块」中止。クリックして表示。 中止
242
+ セッション「重构登录模块」がブロックされました。クリックして表示。 ブロック
243
+ セッション「重构登录模块」上限に到達。クリックして表示。 上限到達
244
+ セッション「重构登录模块」エラー。クリックして表示。 ← エラー
245
+ ```
246
+
247
+ > セッションにタイトルがない場合(`titleValue` が空)は「セッション完了。クリックして表示。」にフォールバック。所要時間・消費・キャッシュヒット率・速度は、カスタムテンプレートで `{duration}` `{usage}` `{cache}` `{tps}` を挿入した場合のみ表示されます。
260
248
 
261
249
  カスタムテンプレート(設定パネルで編集。この例ではすべての情報枠を使用):
262
250
 
@@ -338,7 +326,7 @@ Session "重构登录模块" completed (took 3m25s, used 1,240 in / 3,560 out).
338
326
  | `{icon}` | カスタム通知アイコンのスイッチ:「+ 情報を挿入」から挿入してローカル画像を選択(128×128 正方形に自動圧縮)、理由ごとに独立。本文レンダリング時には剥除され、セッションログには書き込まれません。グローバルの「通知アイコン」より優先。トークンを削除するとその理由のアイコンデータも消去されます | — |
339
327
  | `{label}` | 非推奨 —— レンダリング時に自動的に除去され、旧テンプレートとの互換性を維持(挿入メニューからは削除済み) | — |
340
328
 
341
- テンプレートを空欄にすると内蔵のデフォルトメッセージを使用します(所要時間と消費量が自動付与)。折りたたみ行の `summary` は本文と同じソースです(レンダリング結果を 120 文字に切り詰め)—— 折りたたみ行だけを見るユーザーにも実際のタイトル・所要時間・消費量がわかります。
329
+ テンプレートを空欄にすると内蔵のデフォルトメッセージを使用します(「セッション「{title}」〇〇。クリックして表示。」の形で統一、所要時間と消費量は含みません)。折りたたみ行の `summary` は本文と同じソースです(レンダリング結果を 120 文字に切り詰め)—— 折りたたみ行だけを見るユーザーにも実際のタイトル・所要時間・消費量がわかります。
342
330
 
343
331
  ### プリセットシステム
344
332
 
@@ -521,7 +509,7 @@ node scripts/verify-notice.mjs <session.jsonl.zstd>
521
509
  <details>
522
510
  <summary><b>システム通知のアイコンやサウンドをカスタマイズできますか?</b></summary>
523
511
 
524
- 現在のバージョンはブラウザデフォルトの通知スタイルを使用し、カスタムアイコンやサウンドは注入しません。トーストは固定のダークカードです。これらの機能が必要な場合は、Issue または PR をお寄せください。
512
+ アイコンは**カスタマイズ可能**です:設定パネルの「通知画像」セクションで**通知ヒーロー画像**と**アイコン**をアップロードできます(グローバル)。各理由のテンプレートに `{icon}` タグを挿入すれば、その理由専用のアイコンも指定できます(グローバルより優先)。**サウンド**はカスタマイズできません(システム/ブラウザデフォルトを使用)。トーストは固定のダークカードです。その他のご要望は Issue または PR をお寄せください。
525
513
 
526
514
  </details>
527
515
 
@@ -549,8 +537,9 @@ node scripts/verify-notice.mjs <session.jsonl.zstd>
549
537
 
550
538
  | バージョン | 日付 | 変更内容 |
551
539
  | --- | --- | --- |
540
+ | **0.1.13** | 2026-08-29 | **ワンクリックスタイルプリセット 4 種**を追加(顔文字 / アイルー / ネコ娘 / DeepSeekちゃん——タイトル + 5 理由の文面一式をスタイル化、**5 言語対応**・読み込み時に UI 言語を強制変更しない)。プリセットドロップダウンから廃止済みの旧テンプレート名(playful/formal/detail)を整理。README のデフォルトメッセージ例を「セッション「{title}」〇〇。クリックして表示。」の形に同期(所要時間と消費量は含まない) |
552
541
  | **0.1.12** | 2026-08-29 | パッケージ整理:scripts に混入した一時監査スクリプトを除去 |
553
- | **0.1.11** | 2026-08-29 | **カスタム通知メディア**を追加:① テンプレートの「+ 情報を挿入」メニューに**画像**トークンを追加——`{image}` を挿入してローカル画像を選択(**512px 幅・通知表示比率 16:9 で中央クロップ**に自動圧縮、エディタ内ではサムネイル付きチップとして表示)、理由ごとにアップロードして設定ドキュメントに保存(本文レンダリング時に剥除され、セッションログには書き込まれません)。② **通知イメージ/アイコンがアップロードカードに変更**(空欄は角丸の「+」タイルで、クリックでアップロード。**画像 512×288(16:9 中央クロップ)、アイコン 128×128(1:1 正方形中央クロップ)**。アップロード後はカードにサムネイルが表示され、右上の × で削除)——クロップにより、アップロードした画像が通知カードに完全に表示され、システムの表示領域による切り詰めを防ぎます。③ **プッシュタイトルの「+ 情報を挿入」**で任意の情報トークンを挿入(セッションタイトル/所要時間/消費/キャッシュヒット/速度)。設定パネルの「通知メディア」エリアに**処理方法の説明**(クロップ比率)と**アップロード後のサムネイルプレビュー**を表示。④ **理由ごとの通知アイコン**(テンプレートに `{icon}` トークンを挿入 + ローカルアップロード、128×128 正方形、グローバルより優先)。⑤ **`{image}`/`{icon}` トークンを削除するとその理由の画像/アイコンデータも消去**。⑥ **レイアウト改善:「本文テンプレート × 5」を折りたたみセクションに変更(既定で折りたたみ、パネルをコンパクトに。ヘッダーにカスタマイズ済みの数を表示、クリックで展開)**。⑦ **レイアウト改善②:通知イメージ/アイコンのアップロードカードを横並び 1 行に配置(間に余白);プッシュタイトルと理由ごとのタイトルを「タイトル」の折りたたみセクションに統合(既定で折りたたみ);折りたたみインジケーターを三角形アイコンに変更(「展開/折りたたむ」の文言を削除、i18n 負担を軽減)**。⑧ **操作改善:プッシュタイトルを Chip エディタに変更(挿入した情報はカプセルタグとして表示され、`{title}` などのコードが露出しない);画像/アイコンのカード順を入れ替え(アイコンが先);「本文テンプレート × 5」を「コンテンツ」に改名;画像/アイコンのサムネイルクリックで全画面プレビュー(ライトボックス)、タグは × クリックでのみ削除(誤削除防止)**。⑨ **プレビューを元画像に統一:アップロード時にクロップ版(通知用)と等比の完全版(1024px、ライトボックスの原図表示用)の両方を保存し、カードとタグの拡大プレビューはいずれも未クロップの元画像を表示。折りたたみの三角形アイコンを拡大**。⑩ **タイトルの情報トークン修正:通知タイトル内の `{duration}` `{usage}` `{error}` `{cache}` `{tps}` はセッションの実際の値に置き換えられ、コードが露出しません(編集時はカプセル、送信時は実データ)。「コンテンツ」を 1 行レイアウトに変更(理由ラベル + エディタ + 「+/-」挿入ボタン + 紙飛行機の送信ボタン)**。⑪ **詳細:コンテンツ行下のリアルタイムプレビューを削除(よりコンパクトに);コンテンツのエディタ内余白を縮小(compact);「+/-」と紙飛行機ボタンを角丸矩形枠・垂直中央揃えに変更**。⑫ **削除体験の修正:コンテンツを空にしてもデフォルト文面に戻らず(プレースホルダーを表示)、空にした後はカーソルが末尾に戻るため Backspace 長押しで連続削除可能;「+/-」を SVG 線アイコンに変更(ボタン枠に正確に中央揃え);紙飛行機アイコンを反時計回りに 30° 回転**。⑬ **プレースホルダーとデフォルト文面:テンプレートが空(既定プリセット)のときはエディタにデフォルト文面を直接表示(見たままがそのまま通知されます)。編集後に空にすると「空欄の場合はデフォルトの文面を使用」のプレースホルダーを表示——CSS 疑似要素で実装(ネイティブの input placeholder と同様:選択・削除不可)、従来のコピー可能なプレースホルダー文字列を置き換え**。⑭ **詳細②:プッシュタイトルのプレースホルダー文言を「共通のプッシュタイトル。空欄の場合はデフォルトタイトルを使用(下の理由別タイトルが優先)」に変更、空エディタをクリックするとカーソルが先頭に移動(入力文字が左端から始まる、ネイティブ placeholder と同様);紙飛行機アイコンをさらに反時計回りに 30° 回転(合計 60°);「コンテンツ」の理由ラベルを自動幅に変更(エディタがラベル文字に密着);エディタの高さを統一(box-sizing border-box + min-height 38px、通常の入力欄と同様)**。⑮ **詳細③:理由ラベルを固定 70px 幅に統一(コンテンツと理由別タイトルで一致);Backspace/Delete でのチップ削除を手動処理に変更し、カーソルを削除位置に復元(エディタ先頭に飛ばない);送信ボタンのアイコンをベル(プッシュ通知の意味)に変更;カスタムプリセットが通知イメージ/アイコン(完全版プレビュー含む)も保存するようになり、既定プリセットは空欄のまま**。⑯ **詳細④:通知イメージ/アイコンのアップロードカードを等高に(統一 64px 高、大図 16:9 は幅 114px);理由ラベルの幅を 70px → 60px に;送信ボタンのアイコンをベルから右向きのプッシュ矢印に変更;「タイトル」「コンテンツ」の折りたたみヘッダー文字を太字に**。⑰ **デフォルト文面とラベル:max-tokens の表示を「上限」に統一(ラベル/デフォルトタイトル/プレースホルダー、5 言語で同期);各理由のデフォルト文面を「セッション「{title}」完了。クリックして表示。」に変更(5 言語、エディタのヒントとホスト側レンダリングを同期);理由別タイトルの各行に「+」挿入ボタンを追加(プッシュタイトルと同様:情報トークンのみ、画像/アイコンなし、カーソル位置に挿入)**。⑱ **タグ化とプリセット管理:理由別タイトルを Chip エディタに変更(挿入した情報はカプセルタグとして表示され、{title} などのコードが露出しない;{image}{icon} は禁止——手入力時はリテラルテキストのまま、送信時に剥除);カスタムプリセットに「名前を変更」機能を追加(カスタムプリセット選択時に表示、変更後はドロップダウンと現在のプリセットが同期)**。⑲ **詳細⑤:Chip エディタの文字を垂直中央に配置(行の高さとカプセルを 20px に統一、上下パディング 9px、38px ボックス内で単行テキストが中央に表示);「タイトル」「コンテンツ」の折りたたみバーに背景色を追加(ヘッダーは角丸の色付きバー、展開領域は左ボーダー付きインデント);5 言語 86 キーの i18n を全面的に確認(すべて翻訳済み、zh-TW「名前を変更」と ko「破棄」の表現を修正)**。「送信」テストボタンも同様に適用。システム通知チャネルのみ有効(ページ内トーストはテキストカード);⑳ **詳細⑥:「タイトル」「コンテンツ」の折りたたみヘッダーの背景塗りを削除;プレースホルダー文字色を rgba(127,127,127,0.5) に変更(より淡く、テーマ変数の影響を受けない)**。「送信」テストボタンも同様に適用。システム通知チャネルのみ有効(ページ内トーストはテキストカード);㉑ **修正:「コンテンツ」の各理由行間の区切り線を削除;「コンテンツ」を展開した際のヘッダー直下の線を「タイトル」と同様(全幅)に補完;Backspace/Delete でのチップ削除時、カーソルが先頭に飛ばないよう修正(要素コンテナ内では子ノードのインデックスからチップを特定、チップ直後・エディタ末尾のケースを含む);「未命名」プリセットの名前変更時は自動的に具名プリセットへ昇格(新しい id に置換)し、ドロップダウンに即座に新名を表示**。「送信」テストボタンも同様に適用。システム通知チャネルのみ有効(ページ内トーストはテキストカード);㉒ **修正:文字入力後にプレースホルダーが残らないように(プレースホルダー CSS セレクタと状態属性を整合、入力すると即消え、文字は左端から);画像/アイコンのアップロード・削除後もカーソル位置を維持(DOM 再構築前にカーソルオフセットを保存し、再構築後に復元);プリセットのドロップダウンをフォーカスしても白い選択状態の枠線が出ないように**。「送信」テストボタンも同様に適用。システム通知チャネルのみ有効(ページ内トーストはテキストカード);㉓ **修正:チップ(画像/アイコン含む)削除後もカーソルが飛ばず消えず、連続削除が可能に——画像データ変更による再構築を必要なときだけ実行(DOM 内に対応するメディアチップがなくテンプレートにも該当タグがない場合は再構築をスキップし、カーソルを削除位置に維持。アップロード/置き換えでサムネイル更新が必要な場合のみ再構築)、カーソルオフセット計算も修正(チップは一律 1 位置として数え、内部文字には入らない)**。「送信」テストボタンも同様に適用。システム通知チャネルのみ有効(ページ内トーストはテキストカード) |
542
+ | **0.1.11** | 2026-08-29 | **カスタム通知メディア**を追加:① テンプレートの「+ 情報を挿入」メニューに**画像**トークンを追加——`{image}` を挿入してローカル画像を選択(**512px 幅・通知表示比率 16:9 で中央クロップ**に自動圧縮、エディタ内ではサムネイル付きチップとして表示)、理由ごとにアップロードして設定ドキュメントに保存(本文レンダリング時に剥除され、セッションログには書き込まれません)。② **通知イメージ/アイコンがアップロードカードに変更**(空欄は角丸の「+」タイルで、クリックでアップロード。**画像 512×288(16:9 中央クロップ)、アイコン 128×128(1:1 正方形中央クロップ)**。アップロード後はカードにサムネイルが表示され、右上の × で削除)——クロップにより、アップロードした画像が通知カードに完全に表示され、システムの表示領域による切り詰めを防ぎます。③ **プッシュタイトルの「+ 情報を挿入」**で任意の情報トークンを挿入(セッションタイトル/所要時間/消費/キャッシュヒット/速度)。設定パネルの「通知メディア」エリアに**処理方法の説明**(クロップ比率)と**アップロード後のサムネイルプレビュー**を表示。④ **理由ごとの通知アイコン**(テンプレートに `{icon}` トークンを挿入 + ローカルアップロード、128×128 正方形、グローバルより優先)。⑤ **`{image}`/`{icon}` トークンを削除するとその理由の画像/アイコンデータも消去**。⑥ **レイアウト改善:「本文テンプレート × 5」を折りたたみセクションに変更(既定で折りたたみ、パネルをコンパクトに。ヘッダーにカスタマイズ済みの数を表示、クリックで展開)**。⑦ **レイアウト改善②:通知イメージ/アイコンのアップロードカードを横並び 1 行に配置(間に余白);プッシュタイトルと理由ごとのタイトルを「タイトル」の折りたたみセクションに統合(既定で折りたたみ);折りたたみインジケーターを三角形アイコンに変更(「展開/折りたたむ」の文言を削除、i18n 負担を軽減)**。⑧ **操作改善:プッシュタイトルを Chip エディタに変更(挿入した情報はカプセルタグとして表示され、`{title}` などのコードが露出しない);画像/アイコンのカード順を入れ替え(アイコンが先);「本文テンプレート × 5」を「コンテンツ」に改名;画像/アイコンのサムネイルクリックで全画面プレビュー(ライトボックス)、タグは × クリックでのみ削除(誤削除防止)**。⑨ **プレビューを元画像に統一:アップロード時にクロップ版(通知用)と等比の完全版(1024px、ライトボックスの原図表示用)の両方を保存し、カードとタグの拡大プレビューはいずれも未クロップの元画像を表示。折りたたみの三角形アイコンを拡大**。⑩ **タイトルの情報トークン修正:通知タイトル内の `{duration}` `{usage}` `{error}` `{cache}` `{tps}` はセッションの実際の値に置き換えられ、コードが露出しません(編集時はカプセル、送信時は実データ)。「コンテンツ」を 1 行レイアウトに変更(理由ラベル + エディタ + 「+/-」挿入ボタン + 紙飛行機の送信ボタン)**。⑪ **詳細:コンテンツ行下のリアルタイムプレビューを削除(よりコンパクトに);コンテンツのエディタ内余白を縮小(compact);「+/-」と紙飛行機ボタンを角丸矩形枠・垂直中央揃えに変更**。⑫ **削除体験の修正:コンテンツを空にしてもデフォルト文面に戻らず(プレースホルダーを表示)、空にした後はカーソルが末尾に戻るため Backspace 長押しで連続削除可能;「+/-」を SVG 線アイコンに変更(ボタン枠に正確に中央揃え);紙飛行機アイコンを反時計回りに 30° 回転**。⑬ **プレースホルダーとデフォルト文面:テンプレートが空(既定プリセット)のときはエディタにデフォルト文面を直接表示(見たままがそのまま通知されます)。編集後に空にすると「空欄の場合はデフォルトの文面を使用」のプレースホルダーを表示——CSS 疑似要素で実装(ネイティブの input placeholder と同様:選択・削除不可)、従来のコピー可能なプレースホルダー文字列を置き換え**。⑭ **詳細②:プッシュタイトルのプレースホルダー文言を「共通のプッシュタイトル。空欄の場合はデフォルトタイトルを使用(下の理由別タイトルが優先)」に変更、空エディタをクリックするとカーソルが先頭に移動(入力文字が左端から始まる、ネイティブ placeholder と同様);紙飛行機アイコンをさらに反時計回りに 30° 回転(合計 60°);「コンテンツ」の理由ラベルを自動幅に変更(エディタがラベル文字に密着);エディタの高さを統一(box-sizing border-box + min-height 38px、通常の入力欄と同様)**。⑮ **詳細③:理由ラベルを固定 70px 幅に統一(コンテンツと理由別タイトルで一致);Backspace/Delete でのチップ削除を手動処理に変更し、カーソルを削除位置に復元(エディタ先頭に飛ばない);送信ボタンのアイコンをベル(プッシュ通知の意味)に変更;カスタムプリセットが通知イメージ/アイコン(完全版プレビュー含む)も保存するようになり、既定プリセットは空欄のまま**。⑯ **詳細④:通知イメージ/アイコンのアップロードカードを等高に(統一 64px 高、大図 16:9 は幅 114px);理由ラベルの幅を 70px → 60px に;送信ボタンのアイコンをベルから右向きのプッシュ矢印に変更;「タイトル」「コンテンツ」の折りたたみヘッダー文字を太字に**。⑰ **デフォルト文面とラベル:max-tokens の表示を「上限」に統一(ラベル/デフォルトタイトル/プレースホルダー、5 言語で同期);各理由のデフォルト文面を「セッション「{title}」完了。クリックして表示。」に変更(5 言語、エディタのヒントとホスト側レンダリングを同期);理由別タイトルの各行に「+」挿入ボタンを追加(プッシュタイトルと同様:情報トークンのみ、画像/アイコンなし、カーソル位置に挿入)**。⑱ **タグ化とプリセット管理:理由別タイトルを Chip エディタに変更(挿入した情報はカプセルタグとして表示され、{title} などのコードが露出しない;{image}{icon} は禁止——手入力時はリテラルテキストのまま、送信時に剥除);カスタムプリセットに「名前を変更」機能を追加(カスタムプリセット選択時に表示、変更後はドロップダウンと現在のプリセットが同期)**。⑲ **詳細⑤:Chip エディタの文字を垂直中央に配置(行の高さとカプセルを 20px に統一、上下パディング 9px、38px ボックス内で単行テキストが中央に表示);「タイトル」「コンテンツ」の折りたたみバーに背景色を追加(ヘッダーは角丸の色付きバー、展開領域は左ボーダー付きインデント);5 言語 86 キーの i18n を全面的に確認(すべて翻訳済み、zh-TW「名前を変更」と ko「破棄」の表現を修正)**。「送信」テストボタンも同様に適用。システム通知チャネルのみ有効(ページ内トーストはテキストカード);⑳ **詳細⑥:「タイトル」「コンテンツ」の折りたたみヘッダーの背景塗りを削除;プレースホルダー文字色を rgba(127,127,127,0.5) に変更(より淡く、テーマ変数の影響を受けない)**。「送信」テストボタンも同様に適用。システム通知チャネルのみ有効(ページ内トーストはテキストカード);㉑ **修正:「コンテンツ」の各理由行間の区切り線を削除;「コンテンツ」を展開した際のヘッダー直下の線を「タイトル」と同様(全幅)に補完;Backspace/Delete でのチップ削除時、カーソルが先頭に飛ばないよう修正(要素コンテナ内では子ノードのインデックスからチップを特定、チップ直後・エディタ末尾のケースを含む);「未命名」プリセットの名前変更時は自動的に具名プリセットへ昇格(新しい id に置換)し、ドロップダウンに即座に新名を表示**。「送信」テストボタンも同様に適用。システム通知チャネルのみ有効(ページ内トーストはテキストカード);㉒ **修正:文字入力後にプレースホルダーが残らないように(プレースホルダー CSS セレクタと状態属性を整合、入力すると即消え、文字は左端から);画像/アイコンのアップロード・削除後もカーソル位置を維持(DOM 再構築前にカーソルオフセットを保存し、再構築後に復元);プリセットのドロップダウンをフォーカスしても白い選択状態の枠線が出ないように**。「送信」テストボタンも同様に適用。システム通知チャネルのみ有効(ページ内トーストはテキストカード);㉓ **修正:チップ(画像/アイコン含む)削除後もカーソルが飛ばず消えず、連続削除が可能に——画像データ変更による再構築を必要なときだけ実行(DOM 内に対応するメディアチップがなくテンプレートにも該当タグがない場合は再構築をスキップし、カーソルを削除位置に維持。アップロード/置き換えでサムネイル更新が必要な場合のみ再構築)、カーソルオフセット計算も修正(チップは一律 1 位置として数え、内部文字には入らない)**。「送信」テストボタンも同様に適用。システム通知チャネルのみ有効(ページ内トーストはテキストカード) |
554
543
  | **0.1.10** | 2026-08-29 | 「プッシュタイトル」をネイティブ入力欄に変更(ネイティブのプレースホルダー:コピー不可、入力すると消え、空にすると復元。「+ セッションタイトル」でカーソル位置に `{title}` を挿入)。ドキュメントに QQ ブラウザの内蔵プッシュポップアップの説明を追記(3 つのプッシュ方式の実際の挙動 + 送信ボタンのテストも同じ規則) |
555
544
  | **0.1.9** | 2026-08-29 | プッシュタイトルが**理由別のカスタマイズ**に対応(折りたたみエリア UI、デフォルトで収納され冗長にならない。空欄時は各理由で異なるデフォルトタイトル:タスク完了 / タスクエラー / タスク中止 / タスクブロック / タスクが出力上限に到達、5 言語)。プロジェクションをオブジェクト(kind/text/title)にアップグレードし、host がレンダリングしたタイトルを保持。リセットボタンが**現在の言語を保持**。デフォルトメッセージに「セッションタイトル」ラベルを埋め込み(セッション「{title}」が完了、タイトルなしは自動フォールバック)。設定パネルのテンプレートプレビューを同期。「+ 情報を挿入」でラベル挿入後に自動折りたたみしなくなった。使用中のカスタムプリセットを削除すると自動的にデフォルトへ戻る。テンプレートプレビューを修正(クリックで消えない、入力でのみ非表示、空にすると復元)。各理由に「送信」ボタンを追加(現在のテンプレートでレンダリングしたテスト通知を 1 クリックで送信) |
556
545
  | **0.1.8** | 2026-08-29 | デフォルトのプッシュタイトルを「タスク完了」に変更(`{title}` は引き続きセッションタイトルを参照可)。デフォルトメッセージを終了理由ごとに異なる表現に(完了=コンパクトな括弧式 / 中止・ブロック=文を分ける / エラー=エラー前置 / 上限=アドバイス付き、5 言語)。設定パネルに「リセット」ボタンを追加し、1 クリックでデフォルトに復元 |
package/README.ko.md CHANGED
@@ -13,7 +13,7 @@
13
13
  [![DSH](https://img.shields.io/badge/DSH-Web%20Profile-4D6BFE)](https://www.npmjs.com/package/@telosmaylx/dsh-session-notify)
14
14
  [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/TelosmaYLX/dsh-session-notify/pulls)
15
15
 
16
- 대화의 각 턴이 끝날 때 「완료 / 오류 / 차단 / 상한 도달」 상태를 소요 시간, token 소모량과 함께 세션 로그에 기록하고, 브라우저 시스템 알림과 페이지 내 toast를 푸시합니다. 5개 언어, 시각적 문구 템플릿 편집기, 커스텀 프리셋 라이브러리가 내장되어 있으며, 캐시 적중률과 생성 속도는 공식 프로젝션에서 가져와 상태 표시줄과 동일한 기준을 사용합니다.
16
+ 대화의 각 턴이 끝날 때 「완료 / 오류 / 차단 / 상한 도달」 상태를 소요 시간, token 소모량과 함께 세션 로그에 기록하고, 브라우저 시스템 알림과 페이지 내 toast를 푸시합니다. 5개 언어, 4가지 스타일 프리셋(카오모지 / 아이루 / 네코무스메 / DeepSeek짱), 시각적 문구 템플릿 편집기, 커스텀 프리셋 라이브러리가 내장되어 있으며, 캐시 적중률과 생성 속도는 공식 프로젝션에서 가져와 상태 표시줄과 동일한 기준을 사용합니다.
17
17
 
18
18
  </div>
19
19
 
@@ -66,7 +66,7 @@
66
66
 
67
67
  - **5개 언어**: 간체 중국어, 번체 중국어, English, 일본어, 한국어 —— 알림 문구, 소요 시간·소모량 표현, 설정 패널 UI가 모두 언어에 따라 전환됩니다(전환 즉시 재렌더링).
68
68
  - **시각적 템플릿 편집기**(Chip 캡슐 편집기): 동적 정보를 인라인 캡슐로 렌더링합니다(플레이스홀더 코드가 노출되지 않음). 「+ 정보 삽입」은 커서 위치에 삽입되며(텍스트 중간에도 삽입 가능), 캡슐을 클릭하면 제거됩니다. 각 항목마다 실시간 미리보기가 제공됩니다(정보는 예시 값으로 본문에 흘러 들어감).
69
- - **프리셋 시스템**: 기준선으로 내장된 「기본」 프리셋이 있습니다. 현재 설정은 커스텀 프리셋으로 별도 저장할 수 있으며(`localStorage` 영속화), 자동 번호가 매겨진 이름 없는 프리셋(`이름 없음`, `이름 없음 2`…)과 「출처: xxx · 수정됨」 출처 표시, 프리셋 삭제를 지원합니다.
69
+ - **프리셋 시스템**: 내장 「기본」 기준선 + 원클릭 스타일 프리셋 4종(카오모지 / 아이루 / 네코무스메 / DeepSeek짱 — 제목과 5개 사유 문구를 통째로 스타일화). 현재 설정은 커스텀 프리셋으로 별도 저장할 수 있으며(`localStorage` 영속화), 자동 번호가 매겨진 이름 없는 프리셋(`이름 없음`, `이름 없음 2`…)과 「출처: xxx · 수정됨」 출처 표시, 프리셋 삭제를 지원합니다.
70
70
  - **알림 제목 템플릿**: 비워 두면 각 사유에 대해 기본 제목을 사용합니다(완료=작업 완료 / 오류=작업 오류 / …). `{title}`은 세션 제목을 참조합니다.
71
71
 
72
72
  ### 공식 지표와 동일 기준
@@ -76,7 +76,7 @@
76
76
  - 두 지표 모두 dsh-web-ui 상태 표시줄과 완전히 동일한 기준이며, 대기, 준비, 도구 시간은 포함하지 않습니다. 프로젝션을 사용할 수 없거나 데이터가 준비되지 않으면 로컬 사용량 집계 추정으로 자동 폴백합니다.
77
77
 
78
78
  > [!NOTE]
79
- > 캐시 적중률과 속도는 커스텀 템플릿에서 `{cache}`, `{tps}` 플레이스홀더로 삽입할 때만 표시됩니다. 내장 기본 문구를 사용할 때는 본문에 소요 시간과 소모량만 포함됩니다.
79
+ > 캐시 적중률과 속도는 커스텀 템플릿에서 `{cache}`, `{tps}` 플레이스홀더로 삽입할 때만 표시됩니다. 내장 기본 문구를 사용할 때는 본문에 소요 시간과 소모량이 포함되지 않습니다(표시하려면 커스텀 템플릿에 플레이스홀더를 삽입하세요).
80
80
 
81
81
  ### 엔지니어링 품질
82
82
 
@@ -232,31 +232,19 @@ dsh plugin --profile web remove @telosmaylx/dsh-session-notify
232
232
 
233
233
  ### 알림 예시
234
234
 
235
- 아래는 모두 `lib/core.js`의 `buildNotice`가 실제로 생성한 것입니다. 기본 문구는 종료 사유에 따라 **차별화된 표현**을 사용합니다(단일 문형이 아님):
236
-
237
- 간체 중국어 기본 문구:
238
-
239
- ```text
240
- 会话「重构登录模块」已完成(用时 3 25 秒,消耗 12,400 输入 / 35,600 输出)。 完成:括号紧凑式 + 内嵌会话标题
241
- 会话「重构登录模块」已中止。用时 3 25 秒,消耗 12,400 输入 / 35,600 输出。 中止:句号拆句
242
- 会话「重构登录模块」被阻塞。用时 3 25 秒,消耗 12,400 输入 / 35,600 输出。 阻塞:句号拆句
243
- 会话「重构登录模块」达到输出上限。用时 3 25 秒,消耗 12,400 输入 / 35,600 输出,建议拆分任务后重试。 ← 上限:附建议
244
- ```
245
-
246
- > 세션에 제목이 없으면(`titleValue`가 비어 있음) 제목 없는 문형으로 자동 폴백합니다(예: 「세션 완료(소요 …)」).
247
-
248
- 오류 발생 시 오류 상세가 앞에 표시됩니다(한 줄로 정리, 40자 초과 시 잘림):
249
-
250
- ```text
251
- 会话「重构登录模块」出错:connection timeout(用时 12 秒)。
252
- ```
253
-
254
- English 기본 문구(세션 제목은 큰따옴표 사용):
255
-
256
- ```text
257
- Session "重构登录模块" completed (took 3m25s, used 12,400 in / 35,600 out).
258
- Session "重构登录模块" hit the output-token cap. Took 3m25s, used 12,400 in / 35,600 out — consider splitting the task.
259
- ```
235
+ 아래는 모두 `lib/core.js`의 `buildNotice`가 실제로 생성한 것입니다. 기본 문구는 「세션「{title}」〇〇. 클릭하여 확인.」 형식으로 통일됩니다(종료 사유에 따라 단어가 다르며, **소요 시간·소모량은 포함하지 않음**):
236
+
237
+ 한국어 기본 문구:
238
+
239
+ ```text
240
+ 세션「重构登录模块」 완료. 클릭하여 확인. 완료
241
+ 세션「重构登录模块」 중단됨. 클릭하여 확인. 중단
242
+ 세션「重构登录模块」 차단됨. 클릭하여 확인. 차단
243
+ 세션「重构登录模块」 한도 도달. 클릭하여 확인. 한도 도달
244
+ 세션「重构登录模块」 오류. 클릭하여 확인. ← 오류
245
+ ```
246
+
247
+ > 세션에 제목이 없으면(`titleValue`가 비어 있음) 「세션 완료. 클릭하여 확인.」으로 폴백합니다. 소요 시간·소모량·캐시 적중률·속도는 커스텀 템플릿에서 `{duration}` `{usage}` `{cache}` `{tps}`를 삽입한 경우에만 표시됩니다.
260
248
 
261
249
  커스텀 템플릿(설정 패널에서 편집하며, 이 예시는 모든 정보 슬롯 사용):
262
250
 
@@ -338,7 +326,7 @@ Session "重构登录模块" completed (took 3m25s, used 1,240 in / 3,560 out).
338
326
  | `{icon}` | 사용자 지정 알림 아이콘 스위치: 「+ 정보 삽입」에서 삽입하고 로컬 이미지 선택(128×128 정사각형으로 자동 압축), 사유별로 독립. 본문 렌더링 시 제거되며 세션 로그에 기록되지 않음. 전역 「알림 아이콘」보다 우선. 토큰을 삭제하면 해당 사유의 아이콘 데이터도 함께 지워짐 | — |
339
327
  | `{label}` | 폐기됨 —— 렌더링 시 자동 제거, 기존 템플릿은 계속 호환(삽입 메뉴에서 해당 옵션 제거됨) | — |
340
328
 
341
- 템플릿을 비워 두면 내장 기본 문구를 사용합니다(소요 시간과 소모량 자동 포함). 접히는 행의 `summary`는 본문과 동일한 소스입니다(렌더링 결과 120자로 잘림) —— 접힌 행만 보는 사용자도 실제 제목과 소요 시간, 소모량을 확인할 수 있습니다.
329
+ 템플릿을 비워 두면 내장 기본 문구를 사용합니다(「세션「{title}」〇〇. 클릭하여 확인.」 형식으로 통일, 소요 시간·소모량 미포함). 접히는 행의 `summary`는 본문과 동일한 소스입니다(렌더링 결과 120자로 잘림) —— 접힌 행만 보는 사용자도 실제 제목과 소요 시간, 소모량을 확인할 수 있습니다.
342
330
 
343
331
  ### 프리셋 시스템
344
332
 
@@ -521,7 +509,7 @@ node scripts/verify-notice.mjs <session.jsonl.zstd>
521
509
  <details>
522
510
  <summary><b>시스템 알림의 아이콘이나 소리를 커스터마이징할 수 있나요?</b></summary>
523
511
 
524
- 현재 버전은 브라우저 기본 알림 스타일을 사용하며 커스텀 아이콘이나 소리를 주입하지 않습니다. toast는 고정된 다크 카드입니다. 이런 기능이 필요하면 Issue 또는 PR을 환영합니다.
512
+ 아이콘은 **커스터마이징 가능**합니다: 설정 패널의 「알림 이미지」 영역에서 **알림 히어로 이미지**와 **아이콘**을 업로드할 수 있습니다(전역). 각 사유 템플릿에 `{icon}` 태그를 삽입하면 해당 사유 전용 아이콘도 지정할 수 있습니다(전역보다 우선). **소리**는 커스터마이징할 수 없습니다(시스템/브라우저 기본값 사용). toast는 고정된 다크 카드입니다. 기타 필요 사항이 있으면 Issue 또는 PR을 환영합니다.
525
513
 
526
514
  </details>
527
515
 
@@ -549,8 +537,9 @@ node scripts/verify-notice.mjs <session.jsonl.zstd>
549
537
 
550
538
  | 버전 | 날짜 | 변경 |
551
539
  | --- | --- | --- |
540
+ | **0.1.13** | 2026-08-29 | **원클릭 스타일 프리셋 4종** 추가(카오모지 / 아이루 / 네코무스메 / DeepSeek짱 — 제목 + 5개 사유 문구를 통째로 스타일화, **5개 언어 지원**·불러와도 UI 언어를 강제 변경하지 않음). 프리셋 드롭다운에서 폐기된 옛 템플릿 이름(playful/formal/detail) 정리. README 기본 문구 예시를 「세션「{title}」〇〇. 클릭하여 확인.」 형식으로 동기화(소요 시간·소모량 미포함) |
552
541
  | **0.1.12** | 2026-08-29 | 패키지 정리: scripts에 포함된 임시 감사 스크립트 제거 |
553
- | **0.1.11** | 2026-08-29 | **사용자 지정 알림 미디어** 추가: ① 템플릿의 「+ 정보 삽입」 메뉴에 **이미지** 토큰 추가——`{image}`를 삽입하고 로컬 이미지 선택(**512px 너비·알림 표시 비율 16:9 중앙 크롭**으로 자동 압축, 편집기에서는 썸네일이 있는 칩으로 표시), 사유별로 업로드하여 설정 문서에 저장(본문 렌더링 시 제거되어 세션 로그에 기록되지 않음). ② **알림 이미지/아이콘을 업로드 카드로 변경**(빈 상태는 둥근 모서리 "+" 타일, 클릭하면 업로드. **이미지 512×288(16:9 중앙 크롭), 아이콘 128×128(1:1 정사각 중앙 크롭)**. 업로드 후 카드에 썸네일 표시, 오른쪽 위 ×로 삭제)——크롭으로 업로드한 이미지가 알림 카드에 완전히 표시되어 시스템 표시 영역에 잘리지 않습니다. ③ **알림 제목의 「+ 정보 삽입」**으로 원하는 정보 토큰 삽입(세션 제목/소요 시간/소모/캐시 히트/속도). 설정 패널의 "알림 미디어" 영역에 **처리 방식 안내**(크롭 비율)와 **업로드 후 썸네일 미리보기** 표시. ④ **사유별 알림 아이콘**(템플릿에 `{icon}` 토큰 삽입 + 로컬 업로드, 128×128 정사각형, 전역보다 우선). ⑤ **`{image}`/`{icon}` 토큰을 삭제하면 해당 사유의 이미지/아이콘 데이터도 함께 삭제**. ⑥ **레이아웃 개선: "본문 템플릿 × 5"를 접이식 섹션으로 변경(기본 접힘, 패널을 컴팩트하게. 헤더에 사용자 지정된 개수 표시, 클릭하면 펼침)**. ⑦ **레이아웃 개선②: 알림 이미지/아이콘 업로드 카드를 한 줄에 나란히 배치(사이 여백); 푸시 제목과 사유별 제목을 "제목" 접이식 섹션으로 통합(기본 접힘); 접기 표시를 삼각형 아이콘으로 변경("펼치기/접기" 문구 제거, i18n 부담 감소)**. ⑧ **조작 개선: 푸시 제목을 Chip 편집기로 변경(삽입한 정보가 캡슐 태그로 표시되어 `{title}` 같은 코드가 노출되지 않음); 이미지/아이콘 카드 순서 변경(아이콘 먼저); "본문 템플릿 × 5"를 "콘텐츠"로 개명; 이미지/아이콘 썸네일 클릭 시 전체 화면 미리보기(라이트박스), 태그는 × 클릭으로만 삭제(실수 삭제 방지)**. ⑨ **미리보기를 원본 이미지로 통일: 업로드 시 크롭 버전(알림용)과 비율 유지 전체 버전(1024px, 라이트박스 원본 표시용)을 함께 저장하여 카드와 태그의 확대 미리보기가 모두 크롭 없는 원본을 표시. 접기 삼각형 아이콘 확대**. ⑩ **제목 정보 토큰 수정: 알림 제목 안의 `{duration}` `{usage}` `{error}` `{cache}` `{tps}`가 세션의 실제 값으로 대체되어 코드가 노출되지 않음(편집 시 캡슐, 전송 시 실데이터). "콘텐츠"를 한 줄 레이아웃으로 변경(사유 라벨 + 편집기 + "+/-" 삽입 버튼 + 종이비행기 보내기 버튼)**. ⑪ **세부: 콘텐츠 행 아래 실시간 미리보기 제거(더 컴팩트하게); 콘텐츠 편집기 내부 여백 축소(compact); "+/-"와 종이비행기 버튼을 직사각형 테두리·세로 중앙 정렬로 변경**. ⑫ **삭제 경험 수정: 콘텐츠를 비워도 기본 문구로 복원되지 않음(플레이스홀더 표시), 비운 후 커서가 끝으로 돌아가 Backspace 길게 눌러 연속 삭제 가능; "+/-"를 SVG 선 아이콘으로 변경(버튼 테두리에 정확히 중앙 정렬); 종이비행기 아이콘을 시계 반대 방향 30° 회전**. ⑬ **플레이스홀더와 기본 문구: 템플릿이 비어 있으면(기본 프리셋) 편집기에 기본 문구를 직접 표시(보이는 대로 알림이 전송됨). 편집 후 비우면 "비우면 기본 문구 사용" 플레이스홀더 표시——CSS 의사 요소로 구현(네이티브 input placeholder와 동일: 선택·삭제 불가), 기존 복사 가능한 플레이스홀더 문자열 대체**. ⑭ **세부②: 푸시 제목 플레이스홀더 문구를 "공통 푸시 제목. 비우면 기본 제목 사용(아래 사유별 제목이 우선)"으로 변경, 빈 편집기 클릭 시 커서가 맨 앞으로 이동(입력 문자가 왼쪽 끝에서 시작, 네이티브 placeholder와 동일); 종이비행기 아이콘을 시계 반대 방향으로 30° 더 회전(총 60°); "콘텐츠"의 사유 라벨을 자동 너비로 변경(편집기가 라벨 글자에 밀착); 편집기 높이 통일(box-sizing border-box + min-height 38px, 일반 입력 상자와 동일)**. ⑮ **세부③: 사유 라벨을 고정 70px 너비로 통일(콘텐츠와 사유별 제목 일치); Backspace/Delete로 칩 삭제 시 수동 처리로 변경해 커서를 삭제 위치에 복원(편집기 맨 앞으로 점프하지 않음); 보내기 버튼 아이콘을 벨(푸시 알림 의미)로 변경; 사용자 지정 프리셋이 알림 이미지/아이콘(전체 미리보기 버전 포함)도 저장하며, 기본 프리셋은 비워 둠**. ⑯ **세부④: 알림 이미지/아이콘 업로드 카드 높이 통일(64px 고정, 16:9 대형 이미지는 폭 114px); 사유 라벨 폭 70px → 60px; 보내기 버튼 아이콘을 벨에서 오른쪽 푸시 화살표로 변경; "제목" "콘텐츠" 접이식 헤더 텍스트를 굵게**. ⑰ **기본 문구와 라벨: max-tokens 표시를 "한도"로 통일(라벨/기본 제목/플레이스홀더, 5개 언어 동기화); 각 사유 기본 문구를 "세션 "{title}" 완료. 클릭하여 확인."으로 변경(5개 언어, 편집기 힌트와 호스트 렌더링 동기화); 사유별 제목 각 행에 "+" 삽입 버튼 추가(푸시 제목과 동일: 정보 토큰만, 이미지/아이콘 제외, 커서 위치에 삽입)**. ⑱ **태그화와 프리셋 관리: 사유별 제목을 Chip 편집기로 변경(삽입한 정보가 캡슐 태그로 표시되어 {title} 같은 코드가 노출되지 않음; {image}{icon} 금지——수동 입력 시 리터럴 텍스트 유지, 전송 시 제거); 사용자 지정 프리셋에 "이름 변경" 기능 추가(사용자 지정 프리셋 선택 시 표시, 이름 변경 후 드롭다운과 현재 프리셋 동기화)**. ⑲ **세부 ⑤: Chip 편집기 텍스트 세로 중앙 정렬(줄 높이와 캡슐 20px로 통일, 상하 패딩 9px, 38px 상자 안에서 단일 줄 텍스트 중앙 표시); "제목" "콘텐츠" 접이식 바에 배경색 채움으로 구분(헤더는 둥근 배경 바, 펼쳐진 영역은 왼쪽 보더 들여쓰기); 5개 언어 86개 문구 키 전체 점검(모두 번역 완료, zh-TW "이름 변경"과 ko "포기" 표현 수정)**. 「보내기」 테스트 버튼에도 동일 적용. 시스템 알림 채널에만 적용(페이지 내 토스트는 텍스트 카드); ⑳ **세부⑥: "제목" "콘텐츠" 접이식 헤더의 배경 채우기 제거; 플레이스홀더 글자색을 rgba(127,127,127,0.5)로 변경(더 옅어지고 테마 변수 영향 없음)**. 「보내기」 테스트 버튼에도 동일 적용. 시스템 알림 채널에만 적용(페이지 내 토스트는 텍스트 카드); ㉑ **수정: "콘텐츠"의 각 사유 행 사이 구분선 제거; "콘텐츠" 펼침 시 헤더 바로 아래 선을 "제목"과 동일(전체 너비)하게 보완; Backspace/Delete로 칩 삭제 시 커서가 맨 앞으로 점프하지 않음(요소 컨테이너 내에서는 자식 노드 인덱스로 칩 식별, 칩 바로 뒤/편집기 끝 케이스 포함); "이름 없음" 프리셋 이름 변경 시 자동으로 명명 프리셋으로 승격(새 id로 교체)되어 드롭다운에 새 이름 즉시 표시**. 「보내기」 테스트 버튼에도 동일 적용. 시스템 알림 채널에만 적용(페이지 내 토스트는 텍스트 카드); ㉒ **수정: 텍스트 입력 후 플레이스홀더가 남지 않음(플레이스홀더 CSS 선택자와 상태 속성을 정렬, 입력 즉시 사라지고 문자는 왼쪽 끝에서 시작); 이미지/아이콘 업로드·삭제 후 커서 위치 유지(DOM 재구축 전 커서 오프셋 저장, 재구축 후 복원); 프리셋 드롭다운 포커스 시 흰색 선택 상태 테두리 제거**. 「보내기」 테스트 버튼에도 동일 적용. 시스템 알림 채널에만 적용(페이지 내 토스트는 텍스트 카드); ㉓ **수정: 칩(이미지/아이콘 포함) 삭제 후 커서가 튀거나 사라지지 않고 연속 삭제 가능——이미지 데이터 변경으로 인한 재구축을 필요한 경우에만 실행(DOM에 해당 미디어 칩이 없고 템플릿에도 해당 태그가 없으면 재구축을 건너뛰어 커서를 삭제 위치에 유지. 업로드/교체로 썸네일 갱신이 필요한 경우에만 재구축), 커서 오프셋 계산도 수정(칩은 항상 1개 위치로 계산, 내부 텍스트로 들어가지 않음)**. 「보내기」 테스트 버튼에도 동일 적용. 시스템 알림 채널에만 적용(페이지 내 토스트는 텍스트 카드) |
542
+ | **0.1.11** | 2026-08-29 | **사용자 지정 알림 미디어** 추가: ① 템플릿의 「+ 정보 삽입」 메뉴에 **이미지** 토큰 추가——`{image}`를 삽입하고 로컬 이미지 선택(**512px 너비·알림 표시 비율 16:9 중앙 크롭**으로 자동 압축, 편집기에서는 썸네일이 있는 칩으로 표시), 사유별로 업로드하여 설정 문서에 저장(본문 렌더링 시 제거되어 세션 로그에 기록되지 않음). ② **알림 이미지/아이콘을 업로드 카드로 변경**(빈 상태는 둥근 모서리 "+" 타일, 클릭하면 업로드. **이미지 512×288(16:9 중앙 크롭), 아이콘 128×128(1:1 정사각 중앙 크롭)**. 업로드 후 카드에 썸네일 표시, 오른쪽 위 ×로 삭제)——크롭으로 업로드한 이미지가 알림 카드에 완전히 표시되어 시스템 표시 영역에 잘리지 않습니다. ③ **알림 제목의 「+ 정보 삽입」**으로 원하는 정보 토큰 삽입(세션 제목/소요 시간/소모/캐시 히트/속도). 설정 패널의 "알림 미디어" 영역에 **처리 방식 안내**(크롭 비율)와 **업로드 후 썸네일 미리보기** 표시. ④ **사유별 알림 아이콘**(템플릿에 `{icon}` 토큰 삽입 + 로컬 업로드, 128×128 정사각형, 전역보다 우선). ⑤ **`{image}`/`{icon}` 토큰을 삭제하면 해당 사유의 이미지/아이콘 데이터도 함께 삭제**. ⑥ **레이아웃 개선: "본문 템플릿 × 5"를 접이식 섹션으로 변경(기본 접힘, 패널을 컴팩트하게. 헤더에 사용자 지정된 개수 표시, 클릭하면 펼침)**. ⑦ **레이아웃 개선②: 알림 이미지/아이콘 업로드 카드를 한 줄에 나란히 배치(사이 여백); 푸시 제목과 사유별 제목을 "제목" 접이식 섹션으로 통합(기본 접힘); 접기 표시를 삼각형 아이콘으로 변경("펼치기/접기" 문구 제거, i18n 부담 감소)**. ⑧ **조작 개선: 푸시 제목을 Chip 편집기로 변경(삽입한 정보가 캡슐 태그로 표시되어 `{title}` 같은 코드가 노출되지 않음); 이미지/아이콘 카드 순서 변경(아이콘 먼저); "본문 템플릿 × 5"를 "콘텐츠"로 개명; 이미지/아이콘 썸네일 클릭 시 전체 화면 미리보기(라이트박스), 태그는 × 클릭으로만 삭제(실수 삭제 방지)**. ⑨ **미리보기를 원본 이미지로 통일: 업로드 시 크롭 버전(알림용)과 비율 유지 전체 버전(1024px, 라이트박스 원본 표시용)을 함께 저장하여 카드와 태그의 확대 미리보기가 모두 크롭 없는 원본을 표시. 접기 삼각형 아이콘 확대**. ⑩ **제목 정보 토큰 수정: 알림 제목 안의 `{duration}` `{usage}` `{error}` `{cache}` `{tps}`가 세션의 실제 값으로 대체되어 코드가 노출되지 않음(편집 시 캡슐, 전송 시 실데이터). "콘텐츠"를 한 줄 레이아웃으로 변경(사유 라벨 + 편집기 + "+/-" 삽입 버튼 + 종이비행기 보내기 버튼)**. ⑪ **세부: 콘텐츠 행 아래 실시간 미리보기 제거(더 컴팩트하게); 콘텐츠 편집기 내부 여백 축소(compact); "+/-"와 종이비행기 버튼을 직사각형 테두리·세로 중앙 정렬로 변경**. ⑫ **삭제 경험 수정: 콘텐츠를 비워도 기본 문구로 복원되지 않음(플레이스홀더 표시), 비운 후 커서가 끝으로 돌아가 Backspace 길게 눌러 연속 삭제 가능; "+/-"를 SVG 선 아이콘으로 변경(버튼 테두리에 정확히 중앙 정렬); 종이비행기 아이콘을 시계 반대 방향 30° 회전**. ⑬ **플레이스홀더와 기본 문구: 템플릿이 비어 있으면(기본 프리셋) 편집기에 기본 문구를 직접 표시(보이는 대로 알림이 전송됨). 편집 후 비우면 "비우면 기본 문구 사용" 플레이스홀더 표시——CSS 의사 요소로 구현(네이티브 input placeholder와 동일: 선택·삭제 불가), 기존 복사 가능한 플레이스홀더 문자열 대체**. ⑭ **세부②: 푸시 제목 플레이스홀더 문구를 "공통 푸시 제목. 비우면 기본 제목 사용(아래 사유별 제목이 우선)"으로 변경, 빈 편집기 클릭 시 커서가 맨 앞으로 이동(입력 문자가 왼쪽 끝에서 시작, 네이티브 placeholder와 동일); 종이비행기 아이콘을 시계 반대 방향으로 30° 더 회전(총 60°); "콘텐츠"의 사유 라벨을 자동 너비로 변경(편집기가 라벨 글자에 밀착); 편집기 높이 통일(box-sizing border-box + min-height 38px, 일반 입력 상자와 동일)**. ⑮ **세부③: 사유 라벨을 고정 70px 너비로 통일(콘텐츠와 사유별 제목 일치); Backspace/Delete로 칩 삭제 시 수동 처리로 변경해 커서를 삭제 위치에 복원(편집기 맨 앞으로 점프하지 않음); 보내기 버튼 아이콘을 벨(푸시 알림 의미)로 변경; 사용자 지정 프리셋이 알림 이미지/아이콘(전체 미리보기 버전 포함)도 저장하며, 기본 프리셋은 비워 둠**. ⑯ **세부④: 알림 이미지/아이콘 업로드 카드 높이 통일(64px 고정, 16:9 대형 이미지는 폭 114px); 사유 라벨 폭 70px → 60px; 보내기 버튼 아이콘을 벨에서 오른쪽 푸시 화살표로 변경; "제목" "콘텐츠" 접이식 헤더 텍스트를 굵게**. ⑰ **기본 문구와 라벨: max-tokens 표시를 "한도"로 통일(라벨/기본 제목/플레이스홀더, 5개 언어 동기화); 각 사유 기본 문구를 "세션 "{title}" 완료. 클릭하여 확인."으로 변경(5개 언어, 편집기 힌트와 호스트 렌더링 동기화); 사유별 제목 각 행에 "+" 삽입 버튼 추가(푸시 제목과 동일: 정보 토큰만, 이미지/아이콘 제외, 커서 위치에 삽입)**. ⑱ **태그화와 프리셋 관리: 사유별 제목을 Chip 편집기로 변경(삽입한 정보가 캡슐 태그로 표시되어 {title} 같은 코드가 노출되지 않음; {image}{icon} 금지——수동 입력 시 리터럴 텍스트 유지, 전송 시 제거); 사용자 지정 프리셋에 "이름 변경" 기능 추가(사용자 지정 프리셋 선택 시 표시, 이름 변경 후 드롭다운과 현재 프리셋 동기화)**. ⑲ **세부 ⑤: Chip 편집기 텍스트 세로 중앙 정렬(줄 높이와 캡슐 20px로 통일, 상하 패딩 9px, 38px 상자 안에서 단일 줄 텍스트 중앙 표시); "제목" "콘텐츠" 접이식 바에 배경색 채움으로 구분(헤더는 둥근 배경 바, 펼쳐진 영역은 왼쪽 보더 들여쓰기); 5개 언어 86개 문구 키 전체 점검(모두 번역 완료, zh-TW "이름 변경"과 ko "포기" 표현 수정)**. 「보내기」 테스트 버튼에도 동일 적용. 시스템 알림 채널에만 적용(페이지 내 토스트는 텍스트 카드); ⑳ **세부⑥: "제목" "콘텐츠" 접이식 헤더의 배경 채우기 제거; 플레이스홀더 글자색을 rgba(127,127,127,0.5)로 변경(더 옅어지고 테마 변수 영향 없음)**. 「보내기」 테스트 버튼에도 동일 적용. 시스템 알림 채널에만 적용(페이지 내 토스트는 텍스트 카드); ㉑ **수정: "콘텐츠"의 각 사유 행 사이 구분선 제거; "콘텐츠" 펼침 시 헤더 바로 아래 선을 "제목"과 동일(전체 너비)하게 보완; Backspace/Delete로 칩 삭제 시 커서가 맨 앞으로 점프하지 않음(요소 컨테이너 내에서는 자식 노드 인덱스로 칩 식별, 칩 바로 뒤/편집기 끝 케이스 포함); "이름 없음" 프리셋 이름 변경 시 자동으로 명명 프리셋으로 승격(새 id로 교체)되어 드롭다운에 새 이름 즉시 표시**. 「보내기」 테스트 버튼에도 동일 적용. 시스템 알림 채널에만 적용(페이지 내 토스트는 텍스트 카드); ㉒ **수정: 텍스트 입력 후 플레이스홀더가 남지 않음(플레이스홀더 CSS 선택자와 상태 속성을 정렬, 입력 즉시 사라지고 문자는 왼쪽 끝에서 시작); 이미지/아이콘 업로드·삭제 후 커서 위치 유지(DOM 재구축 전 커서 오프셋 저장, 재구축 후 복원); 프리셋 드롭다운 포커스 시 흰색 선택 상태 테두리 제거**. 「보내기」 테스트 버튼에도 동일 적용. 시스템 알림 채널에만 적용(페이지 내 토스트는 텍스트 카드); ㉓ **수정: 칩(이미지/아이콘 포함) 삭제 후 커서가 튀거나 사라지지 않고 연속 삭제 가능——이미지 데이터 변경으로 인한 재구축을 필요한 경우에만 실행(DOM에 해당 미디어 칩이 없고 템플릿에도 해당 태그가 없으면 재구축을 건너뛰어 커서를 삭제 위치에 유지. 업로드/교체로 썸네일 갱신이 필요한 경우에만 재구축), 커서 오프셋 계산도 수정(칩은 항상 1개 위치로 계산, 내부 텍스트로 들어가지 않음)**. 「보내기」 테스트 버튼에도 동일 적용. 시스템 알림 채널에만 적용(페이지 내 토스트는 텍스트 카드) |
554
543
  | **0.1.10** | 2026-08-29 | 「알림 제목」을 네이티브 입력 상자로 변경(네이티브 placeholder 안내: 복사 불가, 입력 시 사라짐, 비우면 복원. 「+ 세션 제목」으로 커서 위치에 `{title}` 삽입). 문서에 QQ 브라우저 내장 푸시 팝업 설명 추가(세 가지 알림 방식의 실제 동작 + 전송 버튼 테스트도 동일 규칙) |
555
544
  | **0.1.9** | 2026-08-29 | 알림 제목에 **사유별 커스터마이징** 지원(접는 영역 UI, 기본 접힘으로 비대하지 않음. 비워 두면 각 사유에 차별화된 기본 제목 사용: 작업 완료/작업 오류/작업 중단/작업 차단/작업 출력 상한 도달, 5개 언어). 프로젝션을 객체(kind/text/title)로 업그레이드해 host가 렌더링한 제목을 전달. 초기화 버튼이 **현재 언어를 유지**. 기본 문구에 「세션 제목」 라벨 내장(세션 「{title}」 완료, 제목 없으면 자동 폴백). 설정 패널 템플릿 미리보기 동기화. 「+ 정보 삽입」 후 라벨을 삽입해도 더 이상 자동으로 접히지 않음. 사용 중인 커스텀 프리셋을 삭제하면 기본으로 자동 전환. 템플릿 미리보기 수정(클릭해도 사라지지 않고, 입력 시에만 숨겨지며, 비우면 복원). 각 사유마다 「전송」 버튼 추가(원클릭으로 현재 템플릿이 렌더링한 테스트 알림 전송) |
556
545
  | **0.1.8** | 2026-08-29 | 기본 알림 제목을 「작업 완료」로 변경(`{title}`은 여전히 세션 제목을 참조 가능). 기본 문구를 종료 사유별로 차별화 표현(완료는 압축된 괄호식 / 중단·차단은 문장 분리 / 오류는 오류 상세 선행 / 상한은 제안 첨부, 5개 언어). 설정 패널에 「초기화」 버튼 추가, 원클릭으로 기본값 복원 |
package/README.md CHANGED
@@ -13,7 +13,7 @@
13
13
  [![DSH](https://img.shields.io/badge/DSH-Web%20Profile-4D6BFE)](https://www.npmjs.com/package/@telosmaylx/dsh-session-notify)
14
14
  [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/TelosmaYLX/dsh-session-notify/pulls)
15
15
 
16
- 每轮对话结束时,把「已完成 / 出错 / 被阻塞 / 达到上限」连同用时、token 消耗写入会话日志,并推送浏览器系统通知与页内 toast。内置 5 种语言、可视化文案模板编辑器、自定义预设库,缓存命中率与生成速度取自官方投影,与状态栏同口径。
16
+ 每轮对话结束时,把「已完成 / 出错 / 被阻塞 / 达到上限」连同用时、token 消耗写入会话日志,并推送浏览器系统通知与页内 toast。内置 5 种语言、4 套风格预设(颜文字 / 艾露猫 / 猫娘 / DeepSeek 娘)、可视化文案模板编辑器、自定义预设库,缓存命中率与生成速度取自官方投影,与状态栏同口径。
17
17
 
18
18
  </div>
19
19
 
@@ -66,7 +66,7 @@
66
66
 
67
67
  - **5 种语言**:简体中文、繁體中文、English、日本語、한국어 —— 通知文案、时长与用量措辞、设置面板界面全部随语言切换(切换即时重渲染)。
68
68
  - **可视化模板编辑器**(Chip 胶囊编辑器):动态信息渲染为内联胶囊(占位符代码不露出),「+ 插入信息」在光标处插入(可插到文字中间),点击胶囊移除,每栏带实时预览(信息以示例值流入正文)。
69
- - **预设系统**:内置「默认」预设作为基线;当前配置可另存为自定义预设(`localStorage` 持久化),支持自动编号的未命名预设(`未命名`、`未命名 2`…)、「来自:xxx · 已修改」来源指示、删除预设。
69
+ - **预设系统**:内置「默认」基线 + 4 套一键风格预设(颜文字 / 艾露猫 / 猫娘 / DeepSeek 娘——标题与 5 原因正文整套风格化文案);当前配置可另存为自定义预设(`localStorage` 持久化),支持自动编号的未命名预设(`未命名`、`未命名 2`…)、「来自:xxx · 已修改」来源指示、删除预设。
70
70
  - **推送标题模板**:留空时各原因用默认标题(完成=任务已完成 / 出错=任务出错 / …);`{title}` 引用会话标题。
71
71
 
72
72
  ### 与官方口径同源
@@ -76,7 +76,7 @@
76
76
  - 两者与 dsh-web-ui 状态栏完全同口径,不含排队、准备、工具时间;投影不可用或数据未就绪时自动退回本地用量聚合估算。
77
77
 
78
78
  > [!NOTE]
79
- > 缓存命中率与速度只在自定义模板中通过 `{cache}`、`{tps}` 占位符插入时才显示。使用内置默认文案时,正文只含用时与消耗。
79
+ > 缓存命中率与速度只在自定义模板中通过 `{cache}`、`{tps}` 占位符插入时才显示。使用内置默认文案时,正文不含用时与消耗(要显示数据需在自定义模板中插入对应占位符)。
80
80
 
81
81
  ### 工程质量
82
82
 
@@ -232,31 +232,19 @@ dsh plugin --profile web remove @telosmaylx/dsh-session-notify
232
232
 
233
233
  ### 通知示例
234
234
 
235
- 以下均由 `lib/core.js` 的 `buildNotice` 实际生成。默认文案按结束原因**差异化表达**(非清一色句式):
236
-
237
- 简体中文默认文案:
238
-
239
- ```text
240
- 会话「重构登录模块」已完成(用时 3 分 25 秒,消耗 12,400 输入 / 35,600 输出)。完成:括号紧凑式 + 内嵌会话标题
241
- 会话「重构登录模块」已中止。用时 3 分 25 秒,消耗 12,400 输入 / 35,600 输出。 中止:句号拆句
242
- 会话「重构登录模块」被阻塞。用时 3 分 25 秒,消耗 12,400 输入 / 35,600 输出。 阻塞:句号拆句
243
- 会话「重构登录模块」达到输出上限。用时 3 分 25 秒,消耗 12,400 输入 / 35,600 输出,建议拆分任务后重试。 上限:附建议
244
- ```
245
-
246
- > 会话无标题(`titleValue` 为空)时自动退回不带标题的句式,如「会话已完成(用时 …)」。
247
-
248
- 出错时错误详情前置(单行化,超过 40 字符截断):
249
-
250
- ```text
251
- 会话「重构登录模块」出错:connection timeout(用时 12 秒)。
252
- ```
253
-
254
- English 默认文案(会话标题用双引号):
255
-
256
- ```text
257
- Session "重构登录模块" completed (took 3m25s, used 12,400 in / 35,600 out).
258
- Session "重构登录模块" hit the output-token cap. Took 3m25s, used 12,400 in / 35,600 out — consider splitting the task.
259
- ```
235
+ 以下均由 `lib/core.js` 的 `buildNotice` 实际生成。默认文案统一为「会话「{title}」已xx,请点击查看。」句式(按结束原因差异用词;**不含用时与消耗**):
236
+
237
+ 简体中文默认文案:
238
+
239
+ ```text
240
+ 会话「重构登录模块」已完成,请点击查看。完成
241
+ 会话「重构登录模块」已中止,请点击查看。 中止
242
+ 会话「重构登录模块」被阻塞,请点击查看。 阻塞
243
+ 会话「重构登录模块」达到上限,请点击查看。上限
244
+ 会话「重构登录模块」出错,请点击查看。 ← 出错
245
+ ```
246
+
247
+ > 会话无标题(`titleValue` 为空)时自动回退「会话已完成,请点击查看。」;用时/消耗/缓存命中/速度等数据只在自定义模板中通过 `{duration}` `{usage}` `{cache}` `{tps}` 占位符插入时显示。
260
248
 
261
249
  自定义模板(在设置面板编辑,本例用到全部信息位):
262
250
 
@@ -338,7 +326,7 @@ Session "重构登录模块" completed (took 3m25s, used 1,240 in / 3,560 out).
338
326
  | `{icon}` | 自定义通知图标开关:从「+ 插入信息」插入并选择本地图片(自动压缩至 128×128 方形),按原因独立;正文渲染时剥除,不进会话日志;优先于全局「通知图标」;删除标签时该原因图标数据一并清除 | — |
339
327
  | `{label}` | 已废弃 —— 渲染时自动剥除,旧模板仍兼容(插入菜单已移除该选项) | — |
340
328
 
341
- 模板留空即使用内置默认文案(自动带用时与消耗)。折叠行 `summary` 与正文同源(渲染结果截断至 120 字符)—— 只看折叠行的用户也能看到真实标题与用时、消耗。
329
+ 模板留空即使用内置默认文案(「会话「{title}」已xx,请点击查看。」句式,不含用时与消耗)。折叠行 `summary` 与正文同源(渲染结果截断至 120 字符)—— 只看折叠行的用户也能看到真实标题与用时、消耗。
342
330
 
343
331
  ### 预设系统
344
332
 
@@ -521,7 +509,7 @@ node scripts/verify-notice.mjs <session.jsonl.zstd>
521
509
  <details>
522
510
  <summary><b>可以自定义系统通知的图标或声音吗?</b></summary>
523
511
 
524
- 当前版本使用浏览器默认通知样式,不注入自定义图标或声音,toast 为固定深色卡片。如需这些能力欢迎提 Issue 或 PR。
512
+ 图标**可以自定义**:设置面板「通知图片」区可上传**通知大图**与**通知图标**(全局),也可在各原因模板中插入 `{icon}` 标签为该原因单独指定图标(优先于全局);**声音**暂不支持自定义(沿用系统/浏览器默认),toast 为固定深色卡片。如有其他需求欢迎提 Issue 或 PR。
525
513
 
526
514
  </details>
527
515
 
@@ -549,8 +537,9 @@ node scripts/verify-notice.mjs <session.jsonl.zstd>
549
537
 
550
538
  | 版本 | 日期 | 变更 |
551
539
  | --- | --- | --- |
540
+ | **0.1.13** | 2026-08-29 | 新增 **4 套一键风格预设**(颜文字 / 艾露猫 / 猫娘 / DeepSeek 娘——标题 + 5 原因正文整套风格化文案,**支持 5 语言**、载入不强制切换界面语言);清理预设下拉中已废弃的旧模板名(playful/formal/detail);README 默认文案示例同步为「会话「{title}」已xx,请点击查看。」句式(不含用时与消耗) |
552
541
  | **0.1.12** | 2026-08-29 | 发布包清理:移除打包进 scripts 的临时审计脚本 |
553
- | **0.1.11** | 2026-08-29 | 新增**自定义通知图片**:① 模板「+ 插入信息」新增**图片**标签——插入 `{image}` 并选择本地图片(**自动压缩至 512px 宽、按通知显示比例 16:9 居中裁切**,编辑器内显示为带缩略图的小标签),按原因独立上传、保存于设置文档(正文渲染时剥除,不进会话日志);② **通知大图/通知图标改为上传卡片**(空态 = 圆角矩形 + 号,点击上传;**大图 512×288(16:9 居中裁切)、图标 128×128(1:1 方形居中裁切)**;已上传显示缩略图,右上角 × 删除)——裁切保证上传的图完整显示在通知卡片中,不被系统按显示区域硬裁;③ **推送标题的「+ 插入信息」**可插入任意信息位(会话标题/用时/消耗/缓存命中/速度),不再只有会话标题;设置面板「通知图片」区显示**处理方式说明**(裁切比例)与**上传后的缩略图预览**;④ **按原因指定通知图标**(模板插入 `{icon}` 标签 + 本地上传,128×128 方形,优先于全局图标);⑤ **删除 `{image}`/`{icon}` 标签即清除该原因的图片/图标数据**;⑥ **布局优化:「正文模板 × 5」改为折叠区(默认收起保持面板简洁,头部显示已自定义条数,点击展开)**;⑦ **布局优化②:通知大图/图标上传卡片并排一行(中间留白);推送标题与按原因定制标题合并为「标题」折叠区(默认收起);折叠指示改为三角形图标(移除「展开/收起」文案,减少 i18n 负担)**;⑧ **交互优化:推送标题改为 Chip 编辑器(插入的信息显示为胶囊标签,不再暴露 `{title}` 等代码);通知大图/图标顺序调换(图标在前);「正文模板 × 5」改名为「内容」;图片/图标缩略图点击可全屏预览大图(lightbox),标签只有点 × 才删除(防误删)**;⑨ **预览统一为完整原图:上传时同时保存裁切版(通知用)与等比完整版(1024px,lightbox 查看原图用),卡片与标签的放大预览都显示未裁切的原始图像;折叠三角形图标放大**;⑩ **标题信息位修复:通知标题里的 `{duration}` `{usage}` `{error}` `{cache}` `{tps}` 会替换为会话实际值,不再泄漏代码文本(编辑时胶囊、发送时真实数据);「内容」改为一行式布局(原因标签 + 编辑器 + 「+/-」插入按钮 + 纸飞机发送按钮)**;⑪ **细节:移除内容行下方的实时预览(更紧凑);内容编辑器内边距收窄(compact);「+/-」与纸飞机按钮改矩形边框、垂直居中**;⑫ **删除体验修复:内容删空后不再复原为默认文案(改显示占位提示),且删空后光标自动回到末尾——按住 Backspace 可连续删除;「+/-」改用 SVG 线条图标(相对按钮边框精确居中);纸飞机图标逆时针旋转 30°**;⑬ **占位与默认文案:默认预设(空模板)时编辑器直接显示默认文案(所见即所推);编辑后删空显示「留空则使用默认文案」占位——改用 CSS 伪元素实现(与原生 input placeholder 一致:不可选中、不可删除),替换原可复制的占位文本**;⑭ **细节②:推送标题占位描述改为「通用推送标题,留空时则使用默认标题,优先级低于下方自定义标题」,空编辑器点击时光标移到最前(输入文字从最左开始,与原生 placeholder 一致);纸飞机图标再逆时针转 30°(共 60°);「内容」原因标签改为自适应宽度(编辑器紧贴标签文字);编辑器高度统一(box-sizing border-box + min-height 38px,与普通输入框一致)**;⑮ **细节③:原因标签统一为固定 70px 宽(内容与按原因定制标题一致);Backspace/Delete 删除标签改为手动删除并恢复光标到删除位置(不再跳到编辑器开头);发送按钮图标更换为铃铛(推送语义);自定义预设现在同时保存通知大图/图标(含完整预览版),默认预设保持留空**;⑯ **细节④:通知大图/图标上传卡片等高(统一 64px 高,大图 16:9 宽 114px);原因标签宽 70px → 60px;发送按钮图标由铃铛改为向右推送箭头;「标题」「内容」折叠区标题文字加粗**;⑰ **默认文案与标签:max-tokens 的显示统一改为「上限」(标签/默认标题/占位,5 语言同步);各原因默认文案改为「会话「{title}」已xx,请点击查看。」(5 语言,编辑器的 hint 与宿主实际渲染同步);按原因定制标题每行新增「+」插入按钮(同推送标题:仅信息标签,不含图片/图标,插入到光标处)**;⑱ **标签化与预设管理:按原因定制标题改为 Chip 编辑器(插入的信息以胶囊标签显示,不再暴露 `{title}` 等代码;禁止 `{image}`/`{icon}`——手输保持字面文本、发送时剥除);自定义预设新增「重命名」功能(选中自定义预设时出现重命名按钮,改名后下拉与当前预设同步)**;⑲ **细节⑤:Chip 编辑器文字垂直居中(行高与胶囊统一 20px、上下内边距 9px,单行文字在 38px 框内正中);「标题」「内容」折叠栏加底色填充区分(折叠头为圆角底色栏,展开内容区带左侧竖线缩进);全面核对 5 语言 86 个文案键(全部翻译齐全,修订 zh-tw「重新命名」、ko「放弃」两处用词)**;各原因「发送」测试按钮同样生效;仅系统通知通道生效(页内 toast 为文字卡片);⑳ **细节⑥:移除「标题」「内容」折叠头的底色填充;占位符文字颜色改为 rgba(127,127,127,0.5)(更淡,不再受主题变量影响)**;各原因「发送」测试按钮同样生效;仅系统通知通道生效(页内 toast 为文字卡片);㉑ **修复:移除「内容」各原因行之间的分隔横线;「内容」折叠区展开后头下方的横线补齐,与「标题」一致(全宽);退格/删除键删除胶囊时光标不再跳到开头(元素容器内按子节点序号取胶囊,含光标在胶囊后/编辑器末尾的场景);重命名「未命名」预设时自动升级为具名预设(换用新 id),下拉立即显示新名字**;各原因「发送」测试按钮同样生效;仅系统通知通道生效(页内 toast 为文字卡片);㉒ **修复:输入文字后占位提示不再残留(占位 CSS 选择器与状态属性对齐,输入即消失,文字从最左开始);上传/删除图片、图标后光标保持原位,不再跳到最前(重建 DOM 前保存光标偏移、重建后恢复);预设下拉框聚焦时不再出现白色选中态描边**;各原因「发送」测试按钮同样生效;仅系统通知通道生效(页内 toast 为文字卡片);㉓ **修复:删除标签(含图片/图标胶囊)后光标不再跳走或消失,可连贯连续删除——图片数据变化触发的重建改为按需执行(DOM 中已无该媒体胶囊且模板无对应标签时跳过重建,光标保留在原删除位置;仅上传/替换图片需要刷新缩略图时才重建),并修正光标偏移计算(胶囊统一按 1 个位置计,不深入内部文字)**;各原因「发送」测试按钮同样生效;仅系统通知通道生效(页内 toast 为文字卡片) |
542
+ | **0.1.11** | 2026-08-29 | 新增**自定义通知图片**:① 模板「+ 插入信息」新增**图片**标签——插入 `{image}` 并选择本地图片(**自动压缩至 512px 宽、按通知显示比例 16:9 居中裁切**,编辑器内显示为带缩略图的小标签),按原因独立上传、保存于设置文档(正文渲染时剥除,不进会话日志);② **通知大图/通知图标改为上传卡片**(空态 = 圆角矩形 + 号,点击上传;**大图 512×288(16:9 居中裁切)、图标 128×128(1:1 方形居中裁切)**;已上传显示缩略图,右上角 × 删除)——裁切保证上传的图完整显示在通知卡片中,不被系统按显示区域硬裁;③ **推送标题的「+ 插入信息」**可插入任意信息位(会话标题/用时/消耗/缓存命中/速度),不再只有会话标题;设置面板「通知图片」区显示**处理方式说明**(裁切比例)与**上传后的缩略图预览**;④ **按原因指定通知图标**(模板插入 `{icon}` 标签 + 本地上传,128×128 方形,优先于全局图标);⑤ **删除 `{image}`/`{icon}` 标签即清除该原因的图片/图标数据**;⑥ **布局优化:「正文模板 × 5」改为折叠区(默认收起保持面板简洁,头部显示已自定义条数,点击展开)**;⑦ **布局优化②:通知大图/图标上传卡片并排一行(中间留白);推送标题与按原因定制标题合并为「标题」折叠区(默认收起);折叠指示改为三角形图标(移除「展开/收起」文案,减少 i18n 负担)**;⑧ **交互优化:推送标题改为 Chip 编辑器(插入的信息显示为胶囊标签,不再暴露 `{title}` 等代码);通知大图/图标顺序调换(图标在前);「正文模板 × 5」改名为「内容」;图片/图标缩略图点击可全屏预览大图(lightbox),标签只有点 × 才删除(防误删)**;⑨ **预览统一为完整原图:上传时同时保存裁切版(通知用)与等比完整版(1024px,lightbox 查看原图用),卡片与标签的放大预览都显示未裁切的原始图像;折叠三角形图标放大**;⑩ **标题信息位修复:通知标题里的 `{duration}` `{usage}` `{error}` `{cache}` `{tps}` 会替换为会话实际值,不再泄漏代码文本(编辑时胶囊、发送时真实数据);「内容」改为一行式布局(原因标签 + 编辑器 + 「+/-」插入按钮 + 纸飞机发送按钮)**;⑪ **细节:移除内容行下方的实时预览(更紧凑);内容编辑器内边距收窄(compact);「+/-」与纸飞机按钮改矩形边框、垂直居中**;⑫ **删除体验修复:内容删空后不再复原为默认文案(改显示占位提示),且删空后光标自动回到末尾——按住 Backspace 可连续删除;「+/-」改用 SVG 线条图标(相对按钮边框精确居中);纸飞机图标逆时针旋转 30°**;⑬ **占位与默认文案:默认预设(空模板)时编辑器直接显示默认文案(所见即所推);编辑后删空显示「留空则使用默认文案」占位——改用 CSS 伪元素实现(与原生 input placeholder 一致:不可选中、不可删除),替换原可复制的占位文本**;⑭ **细节②:推送标题占位描述改为「通用推送标题,留空时则使用默认标题,优先级低于下方自定义标题」,空编辑器点击时光标移到最前(输入文字从最左开始,与原生 placeholder 一致);纸飞机图标再逆时针转 30°(共 60°);「内容」原因标签改为自适应宽度(编辑器紧贴标签文字);编辑器高度统一(box-sizing border-box + min-height 38px,与普通输入框一致)**;⑮ **细节③:原因标签统一为固定 70px 宽(内容与按原因定制标题一致);Backspace/Delete 删除标签改为手动删除并恢复光标到删除位置(不再跳到编辑器开头);发送按钮图标更换为铃铛(推送语义);自定义预设现在同时保存通知大图/图标(含完整预览版),默认预设保持留空**;⑯ **细节④:通知大图/图标上传卡片等高(统一 64px 高,大图 16:9 宽 114px);原因标签宽 70px → 60px;发送按钮图标由铃铛改为向右推送箭头;「标题」「内容」折叠区标题文字加粗**;⑰ **默认文案与标签:max-tokens 的显示统一改为「上限」(标签/默认标题/占位,5 语言同步);各原因默认文案改为「会话「{title}」已xx,请点击查看。」(5 语言,编辑器的 hint 与宿主实际渲染同步);按原因定制标题每行新增「+」插入按钮(同推送标题:仅信息标签,不含图片/图标,插入到光标处)**;⑱ **标签化与预设管理:按原因定制标题改为 Chip 编辑器(插入的信息以胶囊标签显示,不再暴露 `{title}` 等代码;禁止 `{image}`/`{icon}`——手输保持字面文本、发送时剥除);自定义预设新增「重命名」功能(选中自定义预设时出现重命名按钮,改名后下拉与当前预设同步)**;⑲ **细节⑤:Chip 编辑器文字垂直居中(行高与胶囊统一 20px、上下内边距 9px,单行文字在 38px 框内正中);「标题」「内容」折叠栏加底色填充区分(折叠头为圆角底色栏,展开内容区带左侧竖线缩进);全面核对 5 语言 86 个文案键(全部翻译齐全,修订 zh-tw「重新命名」、ko「放弃」两处用词)**;各原因「发送」测试按钮同样生效;仅系统通知通道生效(页内 toast 为文字卡片);⑳ **细节⑥:移除「标题」「内容」折叠头的底色填充;占位符文字颜色改为 rgba(127,127,127,0.5)(更淡,不再受主题变量影响)**;各原因「发送」测试按钮同样生效;仅系统通知通道生效(页内 toast 为文字卡片);㉑ **修复:移除「内容」各原因行之间的分隔横线;「内容」折叠区展开后头下方的横线补齐,与「标题」一致(全宽);退格/删除键删除胶囊时光标不再跳到开头(元素容器内按子节点序号取胶囊,含光标在胶囊后/编辑器末尾的场景);重命名「未命名」预设时自动升级为具名预设(换用新 id),下拉立即显示新名字**;各原因「发送」测试按钮同样生效;仅系统通知通道生效(页内 toast 为文字卡片);㉒ **修复:输入文字后占位提示不再残留(占位 CSS 选择器与状态属性对齐,输入即消失,文字从最左开始);上传/删除图片、图标后光标保持原位,不再跳到最前(重建 DOM 前保存光标偏移、重建后恢复);预设下拉框聚焦时不再出现白色选中态描边**;各原因「发送」测试按钮同样生效;仅系统通知通道生效(页内 toast 为文字卡片);㉓ **修复:删除标签(含图片/图标胶囊)后光标不再跳走或消失,可连贯连续删除——图片数据变化触发的重建改为按需执行(DOM 中已无该媒体胶囊且模板无对应标签时跳过重建,光标保留在原删除位置;仅上传/替换图片需要刷新缩略图时才重建),并修正光标偏移计算(胶囊统一按 1 个位置计,不深入内部文字)**;各原因「发送」测试按钮同样生效;仅系统通知通道生效(页内 toast 为文字卡片) |
554
543
  | **0.1.10** | 2026-08-29 | 「推送标题」改为原生输入框(原生占位提示:不可复制、输入才消失、清空恢复;「+ 会话标题」在光标处插入 `{title}`);文档补充 QQ 浏览器内置推送弹窗说明(三种推送方式的实际表现 + 发送按钮测试同规则);**多语言 README**:中文设为主页,新增 English / 繁體中文 / 日本語 / 한국어 版本(顶部语言切换互链) |
555
544
  | **0.1.9** | 2026-08-29 | 推送标题支持**按原因定制**(折叠区 UI,默认收起不臃肿;留空时各原因用差异化默认标题:任务已完成/任务出错/任务已中止/任务被阻塞/任务达到输出上限,5 语言);投影升级为对象(kind/text/title)承载 host 渲染好的标题;重置按钮**保留当前语言**;默认文案内嵌「会话标题」标签(会话「{title}」已完成,无标题自动回退);设置面板模板预览同步;「+插入信息」插入标签后不再自动折叠;删除当前使用的自定义预设自动切回默认;模板预览修复(点击不消失、输入才隐藏、清空恢复);每个原因新增「发送」按钮(一键发当前模板渲染的测试通知) |
556
545
  | **0.1.8** | 2026-08-29 | 默认推送标题改为「任务已完成」(`{title}` 仍可引用会话标题);默认文案按结束原因差异化表达(完成紧凑括号式 / 中止·阻塞拆句 / 出错错误前置 / 上限附建议,5 语言);设置面板新增「重置」按钮一键还原默认 |