dsh-as-aistudio 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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-as-aistudio",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "Google-AI-Studio-style turn controls for DeepSeek Harness, in one install: edit a prompt and re-run it, re-run a reply in place, delete a turn from the model context, and render sent prompts as Markdown. Self-contained: the plugin list shows this one row; the four components are dependencies mounted by it. Each still installs alone and works alone.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -53,7 +53,7 @@
53
53
  },
54
54
  "dependencies": {
55
55
  "dsh-delete-turn": "^0.1.8",
56
- "dsh-edit-turn": "^0.2.17",
56
+ "dsh-edit-turn": "^0.2.18",
57
57
  "dsh-markdown-bubble": "^0.1.4",
58
58
  "dsh-rerun-turn": "^0.1.25"
59
59
  },
package/src/client.js CHANGED
@@ -32,7 +32,7 @@ window.__ModuleLoader__.load({
32
32
  const RERUN_PREFIX = '/dsh-rerun-turn'
33
33
 
34
34
  /** Keep in sync with package.json and lib/index.js. */
35
- const PLUGIN_VERSION = '0.2.17'
35
+ const PLUGIN_VERSION = '0.2.18'
36
36
 
37
37
  // --- copy -----------------------------------------------------------------
38
38
 
@@ -73,6 +73,7 @@ window.__ModuleLoader__.load({
73
73
  'error.prompt': '已回退,但改后的内容没能写进上下文。请重试。',
74
74
  'error.reply': '已回退,但替换没有落地。请重试。',
75
75
  'error.empty': '改写后的内容不能为空。',
76
+ 'error.unchanged': '内容没有变化,未做任何修改。',
76
77
  'error.rerun-nothing': '已保存,但这一轮没有可重跑的作答。',
77
78
  'error.rerun-unavailable': '已保存,但重跑没有开始,请稍后重试。',
78
79
  'error.not-rerunnable': '这一轮没有可重跑的作答。',
@@ -113,6 +114,7 @@ window.__ModuleLoader__.load({
113
114
  'error.prompt': 'Rolled back, but the re-run did not start. Send the revised text manually.',
114
115
  'error.reply': 'Rolled back, but the replacement did not land. Try again.',
115
116
  'error.empty': 'The revised message cannot be empty.',
117
+ 'error.unchanged': 'Nothing changed, so no edit was made.',
116
118
  'error.rerun-nothing': 'Saved, but this turn has no reply that can be re-run.',
117
119
  'error.rerun-unavailable': 'Saved, but the re-run did not start; try again.',
118
120
  'error.not-rerunnable': 'This turn has no reply that can be re-run.',
@@ -597,10 +599,26 @@ window.__ModuleLoader__.load({
597
599
  replies,
598
600
  failure: null,
599
601
  })
600
- // The rollback has landed, so the editor is gone with its row: a
601
- // failed second half has to be reported somewhere that survives that.
602
- if (data.kind === 'reply' && data.applied === false) this.notify('reply')
603
- if (data.kind !== 'reply' && data.applied === false) this.notify('prompt')
602
+ // `unchanged` means the host wrote NOTHING: the draft is (verbatim)
603
+ // the text the message already carries. There is no failure to report -
604
+ // the edit was simply not an edit - so it is noticed as such, and
605
+ // nothing else about this pass changes: no row was shadowed, so none is
606
+ // hidden, and the message stays on screen with the pencil it had.
607
+ //
608
+ // The re-run intent survives it. "Re-run" saves first only because the
609
+ // sibling regenerates the turn from the prompt the surface shows; a
610
+ // user who pressed it wants that turn regenerated whether or not the
611
+ // wording moved, so the chain below is NOT gated on a write having
612
+ // happened. (The decision itself is the host's - the text is parsed
613
+ // there, once - and this half only reads the flag it sends back.)
614
+ if (data.unchanged === true) {
615
+ if (!rerunIntent) this.notify('unchanged')
616
+ } else {
617
+ // The rollback has landed, so the editor is gone with its row: a
618
+ // failed second half has to be reported somewhere that survives that.
619
+ if (data.kind === 'reply' && data.applied === false) this.notify('reply')
620
+ if (data.kind !== 'reply' && data.applied === false) this.notify('prompt')
621
+ }
604
622
  // Save first, re-run second - always: the sibling re-runs the turn
605
623
  // from the prompt the surface NOW shows, so the revised wording has
606
624
  // to be on the surface before it is asked to regenerate. Not
@@ -5085,7 +5103,7 @@ window.__ModuleLoader__.load({
5085
5103
  const NS = 'dsh-as-aistudio'
5086
5104
 
5087
5105
  /** Keep in sync with package.json and src/components.js. */
5088
- const PLUGIN_VERSION = '0.2.6'
5106
+ const PLUGIN_VERSION = '0.2.7'
5089
5107
 
5090
5108
  /** Presence marker the live verifier reads. */
5091
5109
  const DEBUG_KEY = '__DSH_AS_AISTUDIO__'
package/src/components.js CHANGED
@@ -26,7 +26,7 @@
26
26
  export const STUDIO_ID = 'dsh-as-aistudio'
27
27
 
28
28
  /** Keep in sync with package.json and src/client.js. */
29
- export const STUDIO_VERSION = '0.2.6'
29
+ export const STUDIO_VERSION = '0.2.7'
30
30
 
31
31
  /**
32
32
  * The AI Studio action strip this studio composes, in the order the user meets
package/src/studio.js CHANGED
@@ -48,7 +48,7 @@ window.__ModuleLoader__.load({
48
48
  const NS = 'dsh-as-aistudio'
49
49
 
50
50
  /** Keep in sync with package.json and src/components.js. */
51
- const PLUGIN_VERSION = '0.2.6'
51
+ const PLUGIN_VERSION = '0.2.7'
52
52
 
53
53
  /** Presence marker the live verifier reads. */
54
54
  const DEBUG_KEY = '__DSH_AS_AISTUDIO__'
@@ -1,6 +1,6 @@
1
1
  // dsh-edit-turn browser half, VENDORED by tools/vendor.mjs - DO NOT EDIT.
2
2
  //
3
- // Source: ../dsh-edit-turn/lib/client.js (v0.2.17, sha256 4719c94b7e1d9104)
3
+ // Source: ../dsh-edit-turn/lib/client.js (v0.2.18, sha256 424621261094f17b)
4
4
  // Regenerate with `npm run vendor`; test/vendor-sync.test.js fails when this is stale.
5
5
  //
6
6
  // The component registers its factory with the host module loader; inside this
@@ -24,7 +24,7 @@ export default (require) => {
24
24
  const RERUN_PREFIX = '/dsh-rerun-turn'
25
25
 
26
26
  /** Keep in sync with package.json and lib/index.js. */
27
- const PLUGIN_VERSION = '0.2.17'
27
+ const PLUGIN_VERSION = '0.2.18'
28
28
 
29
29
  // --- copy -----------------------------------------------------------------
30
30
 
@@ -65,6 +65,7 @@ export default (require) => {
65
65
  'error.prompt': '已回退,但改后的内容没能写进上下文。请重试。',
66
66
  'error.reply': '已回退,但替换没有落地。请重试。',
67
67
  'error.empty': '改写后的内容不能为空。',
68
+ 'error.unchanged': '内容没有变化,未做任何修改。',
68
69
  'error.rerun-nothing': '已保存,但这一轮没有可重跑的作答。',
69
70
  'error.rerun-unavailable': '已保存,但重跑没有开始,请稍后重试。',
70
71
  'error.not-rerunnable': '这一轮没有可重跑的作答。',
@@ -105,6 +106,7 @@ export default (require) => {
105
106
  'error.prompt': 'Rolled back, but the re-run did not start. Send the revised text manually.',
106
107
  'error.reply': 'Rolled back, but the replacement did not land. Try again.',
107
108
  'error.empty': 'The revised message cannot be empty.',
109
+ 'error.unchanged': 'Nothing changed, so no edit was made.',
108
110
  'error.rerun-nothing': 'Saved, but this turn has no reply that can be re-run.',
109
111
  'error.rerun-unavailable': 'Saved, but the re-run did not start; try again.',
110
112
  'error.not-rerunnable': 'This turn has no reply that can be re-run.',
@@ -589,10 +591,26 @@ export default (require) => {
589
591
  replies,
590
592
  failure: null,
591
593
  })
592
- // The rollback has landed, so the editor is gone with its row: a
593
- // failed second half has to be reported somewhere that survives that.
594
- if (data.kind === 'reply' && data.applied === false) this.notify('reply')
595
- if (data.kind !== 'reply' && data.applied === false) this.notify('prompt')
594
+ // `unchanged` means the host wrote NOTHING: the draft is (verbatim)
595
+ // the text the message already carries. There is no failure to report -
596
+ // the edit was simply not an edit - so it is noticed as such, and
597
+ // nothing else about this pass changes: no row was shadowed, so none is
598
+ // hidden, and the message stays on screen with the pencil it had.
599
+ //
600
+ // The re-run intent survives it. "Re-run" saves first only because the
601
+ // sibling regenerates the turn from the prompt the surface shows; a
602
+ // user who pressed it wants that turn regenerated whether or not the
603
+ // wording moved, so the chain below is NOT gated on a write having
604
+ // happened. (The decision itself is the host's - the text is parsed
605
+ // there, once - and this half only reads the flag it sends back.)
606
+ if (data.unchanged === true) {
607
+ if (!rerunIntent) this.notify('unchanged')
608
+ } else {
609
+ // The rollback has landed, so the editor is gone with its row: a
610
+ // failed second half has to be reported somewhere that survives that.
611
+ if (data.kind === 'reply' && data.applied === false) this.notify('reply')
612
+ if (data.kind !== 'reply' && data.applied === false) this.notify('prompt')
613
+ }
596
614
  // Save first, re-run second - always: the sibling re-runs the turn
597
615
  // from the prompt the surface NOW shows, so the revised wording has
598
616
  // to be on the surface before it is asked to regenerate. Not