dsh-as-aistudio 0.5.22 → 0.5.24

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/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@
4
4
 
5
5
  ## 中文
6
6
 
7
+ **0.5.24** —— README 顶部加徽章与 Star 提示(纯文档)。
8
+
9
+ **0.5.23** —— 跟进 dsh-edit-turn 0.5.24(深色皮肤下编辑器黑底黑字)。
10
+
7
11
  **0.5.22** —— 跟进 dsh-log-trim 0.7.9(最小日志体积可填小数)。
8
12
 
9
13
  **0.5.21** —— 跟进 dsh-log-trim 0.7.8(「不需要裁」记跳过)。
package/README.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # dsh-as-aistudio
2
2
 
3
+ <p align="center">
4
+ <a href="https://www.npmjs.com/package/dsh-as-aistudio"><img alt="npm version" src="https://img.shields.io/npm/v/dsh-as-aistudio?color=4d6bfe"></a>
5
+ <a href="https://www.npmjs.com/package/dsh-as-aistudio"><img alt="npm downloads" src="https://img.shields.io/npm/dw/dsh-as-aistudio"></a>
6
+ <a href="https://github.com/DDDMUC/dsh-as-aistudio/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/DDDMUC/dsh-as-aistudio?color=eac54f"></a>
7
+ <a href="LICENSE"><img alt="license" src="https://img.shields.io/npm/l/dsh-as-aistudio"></a>
8
+ </p>
9
+
10
+ > ⭐ **如果这个包帮你少点了几次鼠标,点一下右上角的 Star 就是最直接的支持** —— 本周 5,000+ 次下载,3 个 Star,这个比例有点扎心。
11
+ >
12
+ > ⭐ **If this package saved you a few clicks, a star is the most direct way to say thanks** — 5,000+ downloads last week, 3 stars. Help a plugin out.
13
+
3
14
  **把 DeepSeek Harness 用成 Google AI Studio —— 一轮对话就是一个可以反复打磨的 prompt playground,而且插件列表里只占一行。** 改一句提示词并重跑、原位重跑某条回复、把不该留下的那一轮从模型上下文里删掉、让发出的提示词按 Markdown 渲染。
4
15
 
5
16
  [中文](#中文) · [English](#english)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-as-aistudio",
3
- "version": "0.5.22",
3
+ "version": "0.5.24",
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, render sent prompts as Markdown, and trim idle session logs on boot. Self-contained: the plugin list shows this one row, and the five components (four actions + one maintenance) are vendored inside it - installing the studio installs nothing else.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/client.js CHANGED
@@ -369,11 +369,39 @@ window.__ModuleLoader__.load({
369
369
  clearVar('--dshet-panel')
370
370
  clearVar('--dshet-chip')
371
371
  clearVar('--dshet-field')
372
+ clearVar('--dshet-ink')
373
+ clearVar('--dshet-ink-dim')
374
+ clearVar('--dshet-ink-soft')
372
375
  } else {
373
376
  const fieldSolid = solid(layer2) ?? panelSolid
374
377
  setVar('--dshet-panel', css(panelSolid))
375
378
  setVar('--dshet-chip', css(panelSolid))
376
379
  setVar('--dshet-field', css(fieldSolid))
380
+ // 文字颜色必须和「我们自己画的那块底」配,而不是和主题的底色配:
381
+ // 皮肤可能只覆盖了表面色、没覆盖 label-primary(或把它定义在别的
382
+ // 作用域),这时 `var(--dsw-alias-label-primary, #0f1524)` 会落到近黑,
383
+ // 深色面板上就是「黑底黑字」——看起来像整块黑板。
384
+ // 用面板亮度直接决定前景色。
385
+ const channel = (value) => {
386
+ const v = value / 255
387
+ return v <= 0.03928 ? v / 12.92 : ((v + 0.055) / 1.055) ** 2.4
388
+ }
389
+ const panelLuminance = 0.2126 * channel(panelSolid.r) + 0.7152 * channel(panelSolid.g) + 0.0722 * channel(panelSolid.b)
390
+ const declaredInk = read('--dsw-alias-label-primary')
391
+ const readableOnDark = panelLuminance < 0.4
392
+ const declaredContrast = declaredInk === null
393
+ ? 0
394
+ : Math.abs(0.2126 * channel(declaredInk.r) + 0.7152 * channel(declaredInk.g) + 0.0722 * channel(declaredInk.b) - panelLuminance)
395
+ if (declaredContrast < 0.24) {
396
+ // 主题给的前景在这个面板上没有对比度(或根本没给)——自己配一套。
397
+ setVar('--dshet-ink', readableOnDark ? '#f2f4f8' : '#0f1524')
398
+ setVar('--dshet-ink-dim', readableOnDark ? 'rgba(242,244,248,.76)' : 'rgba(15,21,36,.72)')
399
+ setVar('--dshet-ink-soft', readableOnDark ? 'rgba(242,244,248,.58)' : 'rgba(15,21,36,.55)')
400
+ } else {
401
+ clearVar('--dshet-ink')
402
+ clearVar('--dshet-ink-dim')
403
+ clearVar('--dshet-ink-soft')
404
+ }
377
405
  }
378
406
  if (accent === null) {
379
407
  clearVar('--dshet-on-accent')
@@ -10168,7 +10196,7 @@ window.__ModuleLoader__.load({
10168
10196
  const NS = 'dsh-as-aistudio'
10169
10197
 
10170
10198
  /** Keep in sync with package.json and src/components.js. */
10171
- const PLUGIN_VERSION = '0.5.22'
10199
+ const PLUGIN_VERSION = '0.5.23'
10172
10200
 
10173
10201
  /** Presence marker the live verifier reads. */
10174
10202
  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.5.22'
29
+ export const STUDIO_VERSION = '0.5.24'
30
30
 
31
31
  /**
32
32
  * The AI Studio action strip this studio composes, in the order the user meets
@@ -1,6 +1,6 @@
1
1
  // dsh-edit-turn host half (dsh-edit-turn.js), VENDORED by tools/vendor.mjs - DO NOT EDIT.
2
2
  //
3
- // Source: ../dsh-edit-turn/lib/index.js (v0.5.23, sha256 d7b898199cac0386)
3
+ // Source: ../dsh-edit-turn/lib/index.js (v0.5.24, sha256 66aa182a980bfac6)
4
4
  // Regenerate with `npm run vendor`; test/sync.test.js fails when this is stale.
5
5
  //
6
6
  // src/shell.js imports the copy named after the component, which is why the
@@ -85,7 +85,7 @@ export const PLUGIN_ID = 'dsh-edit-turn'
85
85
  export const name = PLUGIN_ID
86
86
 
87
87
  /** Keep in sync with package.json and lib/client.js. */
88
- export const PLUGIN_VERSION = '0.5.23'
88
+ export const PLUGIN_VERSION = '0.5.24'
89
89
 
90
90
  // A ring of the last few requests, answering "did the browser half even ask, and
91
91
  // what did it get?" without needing its console. Read-only diagnostics: the
@@ -1,6 +1,6 @@
1
1
  // dsh-edit-turn host half (dsh-edit-turn.patch.js), VENDORED by tools/vendor.mjs - DO NOT EDIT.
2
2
  //
3
- // Source: ../dsh-edit-turn/lib/patch.js (v0.5.23, sha256 5e1e8cce1d168f6c)
3
+ // Source: ../dsh-edit-turn/lib/patch.js (v0.5.24, sha256 5e1e8cce1d168f6c)
4
4
  // Regenerate with `npm run vendor`; test/sync.test.js fails when this is stale.
5
5
  //
6
6
  // src/shell.js imports the copy named after the component, which is why the
@@ -1,5 +1,5 @@
1
1
  {
2
- "dsh-edit-turn": "0.5.23",
2
+ "dsh-edit-turn": "0.5.24",
3
3
  "dsh-rerun-turn": "0.2.11",
4
4
  "dsh-delete-turn": "0.2.4",
5
5
  "dsh-markdown-bubble": "0.1.5",