dsh-prompt-templates 1.0.0 → 1.0.1
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/client.js +10 -10
- package/locale/en.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +1 -1
package/client.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
// dsh-prompt-templates ——
|
|
1
|
+
// dsh-prompt-templates —— 浏览器半:提示词模板面板。
|
|
2
2
|
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
3
|
+
// 结构:卡片网格 / 选择器弹窗 / 编辑弹窗 / 恢复默认。
|
|
4
|
+
// 内置模板可移出并在「恢复默认」后找回;分类与折叠状态持久化在宿主侧。
|
|
5
|
+
// 面板通过宿主 HTTP 端点读写数据,通过 inputActions 写入输入框,
|
|
6
|
+
// 图标为内联 SVG,翻译由内置字典处理,不引入额外依赖。
|
|
7
7
|
//
|
|
8
8
|
// 注册位置:
|
|
9
9
|
// conversation.input.left -> 图标按钮(输入框工具行左侧,dsh 为插件保留的空位)
|
|
@@ -197,7 +197,7 @@ window.__ModuleLoader__.load({
|
|
|
197
197
|
}
|
|
198
198
|
|
|
199
199
|
// ---------------------------------------------------------------- icons
|
|
200
|
-
//
|
|
200
|
+
// 图标为内联线性 SVG,避免额外依赖。
|
|
201
201
|
function svg(paths, size) {
|
|
202
202
|
return function Icon(props) {
|
|
203
203
|
return h(
|
|
@@ -264,7 +264,7 @@ window.__ModuleLoader__.load({
|
|
|
264
264
|
}
|
|
265
265
|
|
|
266
266
|
// ---------------------------------------------------------------- styles
|
|
267
|
-
//
|
|
267
|
+
// 视觉规则;变量层把 --text/--border/--accent… 映射到 dsh 主题 token。
|
|
268
268
|
// ---------------------------------------------------------------- styles
|
|
269
269
|
// Liquid Glass:半透明玻璃面板 + 内层轻玻璃卡片 + 统一圆角与柔和动效。
|
|
270
270
|
// 颜色全部走 dsh 主题 token,明暗主题自动跟随;不支持 backdrop-filter 时降级为更实的底色。
|
|
@@ -324,7 +324,7 @@ window.__ModuleLoader__.load({
|
|
|
324
324
|
'--lg-ease: cubic-bezier(.22,.61,.36,1)',
|
|
325
325
|
'--lg-dur: 220ms',
|
|
326
326
|
|
|
327
|
-
//
|
|
327
|
+
// 旧变量名别名,保持既有规则兼容
|
|
328
328
|
'--text: var(--lg-text)',
|
|
329
329
|
'--text-dim: var(--lg-text-dim)',
|
|
330
330
|
'--text-faint: var(--lg-text-faint)',
|
|
@@ -625,7 +625,7 @@ window.__ModuleLoader__.load({
|
|
|
625
625
|
}, [])
|
|
626
626
|
}
|
|
627
627
|
|
|
628
|
-
/** 有效模板 = 内置(未移出,应用覆盖)+
|
|
628
|
+
/** 有效模板 = 内置(未移出,应用覆盖)+ 自定义。 */
|
|
629
629
|
function computeTemplates(items, builtin) {
|
|
630
630
|
var overrides = new Map()
|
|
631
631
|
var hidden = new Set()
|
|
@@ -1389,7 +1389,7 @@ window.__ModuleLoader__.load({
|
|
|
1389
1389
|
}
|
|
1390
1390
|
|
|
1391
1391
|
// ---------------------------------------------------------------- 面板主体
|
|
1392
|
-
/** 一个面板实例 = 选择器弹窗 +
|
|
1392
|
+
/** 一个面板实例 = 选择器弹窗 + 编辑弹窗状态。 */
|
|
1393
1393
|
// ---------------------------------------------------------------- 分类管理
|
|
1394
1394
|
function CategoryManager(props) {
|
|
1395
1395
|
var categories = props.categories
|
package/locale/en.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"title": "Prompt Templates",
|
|
4
|
-
"description": "
|
|
4
|
+
"description": "Open a template panel from the composer icon: category groups with collapse, 34 built-in templates (9 AI-coding mindset shortcuts), search, filters, favorites, editing and AI-assisted classification."
|
|
5
5
|
}
|
|
6
6
|
}
|
package/locale/zh.json
CHANGED