dsh-paste-code-block 0.2.6 → 0.2.7

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/client.js +6 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-paste-code-block",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "Cherry Studio-style paste for DSH Web: pasted text/code becomes a bordered, collapsible, language-tagged card with localized names (中文/English) and a one-click remove button; restored as a fenced code block on send — and folded back into collapsed, expandable cards in the conversation.",
5
5
  "license": "MIT",
6
6
  "author": "DSH paste-code-block contributors",
package/src/client.js CHANGED
@@ -1341,12 +1341,17 @@ window.__ModuleLoader__.load({
1341
1341
  const FOLD_STAMP_ATTR = 'data-dsh-pcb-stamp' // on a host: the content stamp it was built from
1342
1342
  const FOLD_HIDE_ATTR = 'data-dsh-pcb-hide' // on every run the scan hid: the same stamp
1343
1343
  const FOLD_SIG_ATTR = 'data-dsh-pcb-sig' // on the bubble: '<mode>|<stamp>' it was folded for
1344
+ // Match the message bubble container case-insensitively: DSH renamed its
1345
+ // chat bubble class from `...bubble...` to `_367UGW_chatBubble` (capital B),
1346
+ // and a bare [class*="bubble"] comparison is case-sensitive — it matched
1347
+ // nothing on the new shell, so sent fenced blocks were never folded and
1348
+ // stayed expanded in the transcript. The `i` flag makes it match both.
1344
1349
  const FOLD_BUBBLE_SEL = [
1345
1350
  '[data-chat-flow-kind="user"]',
1346
1351
  '[data-chat-flow-kind="steering"]',
1347
1352
  '[data-submission-echo]',
1348
1353
  '[data-pending-steering]',
1349
- ].map((s) => `${s} [class*="bubble"]`).join(',')
1354
+ ].map((s) => `${s} [class*="bubble" i]`).join(',')
1350
1355
  const foldOpenKeys = new Set() // user-toggled-open cards, stable across rebuilds
1351
1356
  let foldRev = 0 // bumped on locale switch so cards re-title
1352
1357