@galaxycore/ai-chat 0.11.0 → 0.11.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/CHANGELOG.md +5 -0
- package/dist/{branches-CZkkLIra.d.ts → branches-BwA51zXG.d.ts} +6 -3
- package/dist/headless.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +228 -126
- package/dist/index.js.map +1 -1
- package/dist/styles.css +15 -8
- package/docs/publishing.md +5 -5
- package/package.json +1 -1
package/dist/styles.css
CHANGED
|
@@ -463,7 +463,8 @@
|
|
|
463
463
|
.gc-chat__reasoning-segment[data-selected='true'] { background: var(--gc-chat-bg); color: var(--gc-chat-text); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
|
|
464
464
|
.gc-chat__reasoning-segment:focus-visible { outline: 2px solid var(--gc-chat-focus); outline-offset: -2px; }
|
|
465
465
|
/* Circular context-window ring trigger, Cursor-style breakdown popover, and compaction divider. */
|
|
466
|
-
.gc-chat__context-usage
|
|
466
|
+
.gc-chat__context-usage,
|
|
467
|
+
.gc-chat__popover.gc-chat__context-usage-popover {
|
|
467
468
|
--gc-chat-ctx-slate: #7d8590;
|
|
468
469
|
--gc-chat-ctx-violet: #b07be8;
|
|
469
470
|
--gc-chat-ctx-green: #58c26a;
|
|
@@ -472,13 +473,17 @@
|
|
|
472
473
|
--gc-chat-ctx-blue: #4a9cf0;
|
|
473
474
|
--gc-chat-ctx-orange: #dc7026;
|
|
474
475
|
--gc-chat-ctx-teal: #2ea89b;
|
|
476
|
+
}
|
|
477
|
+
.gc-chat__context-usage {
|
|
475
478
|
position: relative;
|
|
476
479
|
display: inline-flex;
|
|
477
480
|
align-items: center;
|
|
478
481
|
flex-shrink: 0;
|
|
479
482
|
}
|
|
480
483
|
.gc-chat[data-theme='dark'] .gc-chat__context-usage,
|
|
481
|
-
:root[data-theme='dark'] .gc-chat__context-usage
|
|
484
|
+
:root[data-theme='dark'] .gc-chat__context-usage,
|
|
485
|
+
.gc-chat__popover.gc-chat__context-usage-popover[data-theme='dark'],
|
|
486
|
+
:root[data-theme='dark'] .gc-chat__popover.gc-chat__context-usage-popover {
|
|
482
487
|
--gc-chat-ctx-slate: #838b98;
|
|
483
488
|
--gc-chat-ctx-violet: #c084fc;
|
|
484
489
|
--gc-chat-ctx-green: #7ce38b;
|
|
@@ -489,7 +494,8 @@
|
|
|
489
494
|
--gc-chat-ctx-teal: #3ec9ba;
|
|
490
495
|
}
|
|
491
496
|
@media (prefers-color-scheme: dark) {
|
|
492
|
-
.gc-chat[data-theme='auto'] .gc-chat__context-usage
|
|
497
|
+
.gc-chat[data-theme='auto'] .gc-chat__context-usage,
|
|
498
|
+
.gc-chat__popover.gc-chat__context-usage-popover[data-theme='auto'] {
|
|
493
499
|
--gc-chat-ctx-slate: #838b98;
|
|
494
500
|
--gc-chat-ctx-violet: #c084fc;
|
|
495
501
|
--gc-chat-ctx-green: #7ce38b;
|
|
@@ -500,7 +506,6 @@
|
|
|
500
506
|
--gc-chat-ctx-teal: #3ec9ba;
|
|
501
507
|
}
|
|
502
508
|
}
|
|
503
|
-
:where(.gc-chat__composer, .ai-chat-composer) .gc-chat__context-usage { position: static; }
|
|
504
509
|
.gc-chat__context-usage-trigger { display: inline-grid; place-items: center; width: var(--gc-chat-control-size, 30px); height: var(--gc-chat-control-size, 30px); padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--gc-chat-muted, #677287); cursor: pointer; flex-shrink: 0; transition: background-color 160ms ease, color 160ms ease; }
|
|
505
510
|
.gc-chat__context-usage-trigger:hover:not(:disabled),
|
|
506
511
|
.gc-chat__context-usage-trigger[data-open='true'] { background: var(--gc-chat-surface-hover, #f7f8fb); color: var(--gc-chat-text, #253047); }
|
|
@@ -511,13 +516,15 @@
|
|
|
511
516
|
.gc-chat__context-usage-ring-fill { fill: none; stroke: var(--gc-chat-text, #253047); stroke-width: 2.15; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset 260ms cubic-bezier(.23, 1, .32, 1), stroke 200ms ease; }
|
|
512
517
|
.gc-chat__context-usage-ring[data-level='warn'] .gc-chat__context-usage-ring-fill { stroke: var(--gc-chat-warning, #8b631c); }
|
|
513
518
|
.gc-chat__context-usage-ring[data-level='high'] .gc-chat__context-usage-ring-fill { stroke: var(--gc-chat-danger, #b44444); }
|
|
514
|
-
.gc-chat__popover.gc-chat__context-usage-popover {
|
|
515
|
-
.gc-
|
|
519
|
+
.gc-chat__popover.gc-chat__context-usage-popover { position: fixed; z-index: 1000; box-sizing: border-box; left: auto; right: auto; min-width: 0; width: min(360px, calc(100vw - 24px)); max-width: calc(100vw - 24px); overflow-y: auto; padding: 16px 18px 18px; border: 1px solid var(--gc-chat-border, #e8ecf3); border-radius: 14px; background: var(--gc-chat-popover-bg, var(--gc-chat-bg, #ffffff)); color: var(--gc-chat-text, #253047); box-shadow: var(--gc-chat-popover-shadow, 0 12px 32px rgba(0, 0, 0, .12), 0 2px 6px rgba(0, 0, 0, .06)); font-family: var(--gc-chat-font, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif); -webkit-font-smoothing: antialiased; }
|
|
520
|
+
.gc-chat__popover.gc-chat__context-usage-popover *,
|
|
521
|
+
.gc-chat__popover.gc-chat__context-usage-popover *::before,
|
|
522
|
+
.gc-chat__popover.gc-chat__context-usage-popover *::after { box-sizing: border-box; }
|
|
523
|
+
.gc-chat__popover.gc-chat__context-usage-popover[data-theme='dark'],
|
|
516
524
|
:root[data-theme='dark'] .gc-chat__popover.gc-chat__context-usage-popover { border-color: color-mix(in srgb, var(--gc-chat-text, #e6ebf5) 12%, var(--gc-chat-border, #343e50)); }
|
|
517
525
|
@media (prefers-color-scheme: dark) {
|
|
518
|
-
.gc-
|
|
526
|
+
.gc-chat__popover.gc-chat__context-usage-popover[data-theme='auto'] { border-color: color-mix(in srgb, var(--gc-chat-text, #e6ebf5) 12%, var(--gc-chat-border, #343e50)); }
|
|
519
527
|
}
|
|
520
|
-
:where(.gc-chat__composer, .ai-chat-composer) .gc-chat__popover.gc-chat__context-usage-popover { left: 0; right: 0; bottom: calc(100% + 8px); width: auto; min-width: 0; max-width: none; }
|
|
521
528
|
.gc-chat__context-usage-panel { display: grid; gap: 14px; }
|
|
522
529
|
.gc-chat__context-usage-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
|
|
523
530
|
.gc-chat__context-usage-heading { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
|
package/docs/publishing.md
CHANGED
|
@@ -36,7 +36,7 @@ mkdir -p artifacts
|
|
|
36
36
|
npm pack --pack-destination artifacts
|
|
37
37
|
|
|
38
38
|
# 消费项目:替换为真实文件的绝对路径
|
|
39
|
-
npm install /absolute/path/to/galaxycore-ai-chat-0.11.
|
|
39
|
+
npm install /absolute/path/to/galaxycore-ai-chat-0.11.1.tgz
|
|
40
40
|
npm install ai@^7.0.137 @ai-sdk/react@^4.0.140
|
|
41
41
|
```
|
|
42
42
|
|
|
@@ -53,7 +53,7 @@ npm run check
|
|
|
53
53
|
npm pack --dry-run
|
|
54
54
|
mkdir -p artifacts
|
|
55
55
|
npm pack --pack-destination artifacts
|
|
56
|
-
tar -tzf artifacts/galaxycore-ai-chat-0.11.
|
|
56
|
+
tar -tzf artifacts/galaxycore-ai-chat-0.11.1.tgz
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
`check` 执行类型检查、组件与网关测试、库构建和可部署示例构建;示例构建包含文档站。`prepack` 构建库,`prepublishOnly` 执行完整检查。tarball 应包含公开 JS 入口、声明、CSS、README 和文档,不应包含模型凭据、认证配置或业务数据。
|
|
@@ -85,12 +85,12 @@ CI 构建和测试步骤无需发布凭据。发布 job 可使用 CI secret 注
|
|
|
85
85
|
|
|
86
86
|
## 版本与发布
|
|
87
87
|
|
|
88
|
-
当前组件版本为 `0.11.
|
|
88
|
+
当前组件版本为 `0.11.1`,网关版本为 `0.2.0`,两者独立升级。0.x 阶段,修复使用 patch,新增功能和未冻结接口调整使用 minor,并在 changelog 说明兼容性。稳定 API 后再发布 1.0。
|
|
89
89
|
|
|
90
90
|
下面以 npmjs.org 公开发布为例。命令会实际上传产物,应在完成验收后由发布负责人执行;发布私有 registry 时替换地址,并按该服务调整可见性参数:
|
|
91
91
|
|
|
92
92
|
```sh
|
|
93
|
-
npm publish ./artifacts/galaxycore-ai-chat-0.11.
|
|
93
|
+
npm publish ./artifacts/galaxycore-ai-chat-0.11.1.tgz \
|
|
94
94
|
--access public --tag latest \
|
|
95
95
|
--registry=https://registry.npmjs.org/
|
|
96
96
|
```
|
|
@@ -98,7 +98,7 @@ npm publish ./artifacts/galaxycore-ai-chat-0.11.0.tgz \
|
|
|
98
98
|
使用 tarball 发布时,先显式执行完整检查,不依赖源仓库的生命周期脚本一定被触发。`latest` 是不指定版本安装时使用的标签,不代表 API 已冻结。需要独立试用通道时,可以采用预发布版本及 `next` 标签。发布后检查远端版本和完整性:
|
|
99
99
|
|
|
100
100
|
```sh
|
|
101
|
-
npm view @galaxycore/ai-chat@0.11.
|
|
101
|
+
npm view @galaxycore/ai-chat@0.11.1 version dist.integrity \
|
|
102
102
|
--registry=https://registry.npmjs.org/
|
|
103
103
|
npm dist-tag ls @galaxycore/ai-chat \
|
|
104
104
|
--registry=https://registry.npmjs.org/
|