@morlay/ui-conversation-manager 0.0.2-alpha.7 → 0.0.2-alpha.9
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/README.md +13 -12
- package/dist/client.d.cts +53 -11
- package/dist/client.d.mts +53 -11
- package/locale/en.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +14 -14
- package/src/client/controller.ts +4 -1
package/README.md
CHANGED
|
@@ -28,16 +28,16 @@ ui-plugin-manager 同一种注册方式)。页面分两层 Tabs(官方 `Pill
|
|
|
28
28
|
**默认排除已归档**(给上游 UI 用),归档集的管理动作要完整集合,两条路不混(决策见
|
|
29
29
|
[session-rdb 的 ADR](../session-rdb/.agents/adrs/20260922-会话列表两条路.md)):
|
|
30
30
|
|
|
31
|
-
| 动作 | 接缝
|
|
32
|
-
| ------------ |
|
|
31
|
+
| 动作 | 接缝 |
|
|
32
|
+
| ------------ | -------------------------------------------------------------------------------------------------------------------------------- |
|
|
33
33
|
| 列表与标题 | `POST /api/session.rows`(`@morlay/session-rdb`:完整语料 + 标题 + 最后活动时间 + 工作区归属;搜索 / 子代理过滤 / 分页都在后端) |
|
|
34
|
-
| 归档 | `ctx.uiWorkspace.archiveSession`(上游 ui-workspace,未归档行提供)
|
|
35
|
-
| 取消归档 | `ctx.uiWorkspace.unarchiveSession`(上游 ui-workspace,已归档行提供)
|
|
36
|
-
| 导出 | `POST /api/session.export`(`@morlay/session-rdb`,直接下载 zip)
|
|
37
|
-
| 删除 | `POST /api/session.delete`(`@morlay/session-rdb`,仅已归档行可用)
|
|
38
|
-
| 导入为新会话 | `POST /api/session.import`(`@morlay/session-rdb`,不带 `sessionId` = 新建会话)
|
|
39
|
-
| 清理孤儿数据 | `POST /api/session.gc`(停 agent → 回收孤儿 subagent 会话 → 回收孤儿事件行 → VACUUM;执行期间阻塞界面)
|
|
40
|
-
| 用量统计 | `POST /api/session.usage`(`@morlay/session-rdb` 读专用用量表聚合;进入统计视图时拉一次,维度切换本地折叠)
|
|
34
|
+
| 归档 | `ctx.uiWorkspace.archiveSession`(上游 ui-workspace,未归档行提供) |
|
|
35
|
+
| 取消归档 | `ctx.uiWorkspace.unarchiveSession`(上游 ui-workspace,已归档行提供) |
|
|
36
|
+
| 导出 | `POST /api/session.export`(`@morlay/session-rdb`,直接下载 zip) |
|
|
37
|
+
| 删除 | `POST /api/session.delete`(`@morlay/session-rdb`,仅已归档行可用) |
|
|
38
|
+
| 导入为新会话 | `POST /api/session.import`(`@morlay/session-rdb`,不带 `sessionId` = 新建会话) |
|
|
39
|
+
| 清理孤儿数据 | `POST /api/session.gc`(停 agent → 回收孤儿 subagent 会话 → 回收孤儿事件行 → VACUUM;执行期间阻塞界面) |
|
|
40
|
+
| 用量统计 | `POST /api/session.usage`(`@morlay/session-rdb` 读专用用量表聚合;进入统计视图时拉一次,维度切换本地折叠) |
|
|
41
41
|
|
|
42
42
|
归档 / 取消归档 / 删除 / 导入 / GC 成功后重拉会话行;host 拒绝(未归档 / 正在使用 / 不存在)
|
|
43
43
|
时按错误码给出可读文案。列表每页 20 条,搜索框复用官方 `Input`(连同官方图标与焦点样式)。
|
|
@@ -54,8 +54,9 @@ GC 是唯一会**停止所有运行中 agent** 的动作:确认后进入不可
|
|
|
54
54
|
|
|
55
55
|
时间范围的按钮与维度 tab 共用**同一套官方 tab 条视觉**(文字 13/16 wt500、选中态品牌蓝 + 2px 下划线,
|
|
56
56
|
取自会话头部的 `ConversationRoot.module.css`),只在其语义上用 `radiogroup`(单选筛选)区别于维度的 `tab`;
|
|
57
|
-
**不用 `Pill`**——官方 `ui-primitives` README
|
|
58
|
-
|
|
57
|
+
**不用 `Pill`**——官方 `ui-primitives` README 里 `Pill` 是「视图切换与筛选用法的可选中胶囊」(只读 capsule 是
|
|
58
|
+
`Tag`),官方那件互斥择一的选择件是 `SegmentedControl`(受控 tab 形态 `SegmentedTabs`);我们这里是**单选筛选**:
|
|
59
|
+
视觉取 tab 条、语义用 `radiogroup`。
|
|
59
60
|
|
|
60
61
|
统计的每一行(总览与列表)是同一形态:行 label + 横向排布的单项,所以读法一致——
|
|
61
62
|
「`data-usage-key=2026-09-14` 行里 `data-usage-cell=input` 的 `data-usage-value`」。
|
|
@@ -97,5 +98,5 @@ GC 是唯一会**停止所有运行中 agent** 的动作:确认后进入不可
|
|
|
97
98
|
|
|
98
99
|
## 文档
|
|
99
100
|
|
|
100
|
-
- 决策:[ADR-禁用上游已归档入口改由对话管理页承载](
|
|
101
|
+
- 决策:[ADR-禁用上游已归档入口改由对话管理页承载](../../bundles/better-session/.agents/adrs/20260918-禁用上游已归档入口改由对话管理页承载.md)
|
|
101
102
|
- 测试落点:[`src/__tests__/`](./src/__tests__)(注册面 / 页面 / 注入面 / 数字格式化四条 spec)
|
package/dist/client.d.cts
CHANGED
|
@@ -1096,9 +1096,8 @@ interface ToolRemovalBlock {
|
|
|
1096
1096
|
}
|
|
1097
1097
|
/**
|
|
1098
1098
|
* Merge-extensible content blocks keyed by `type`. New core blocks must land
|
|
1099
|
-
* with adapter, UI, and compaction support.
|
|
1100
|
-
*
|
|
1101
|
-
* their producers and consumers are implemented together.
|
|
1099
|
+
* with adapter, UI, and compaction support. Tool-change blocks belong to
|
|
1100
|
+
* developer messages; `projectToolUpdates` selects what each route receives.
|
|
1102
1101
|
*/
|
|
1103
1102
|
interface ContentBlockMap {
|
|
1104
1103
|
'text': TextBlock;
|
|
@@ -1328,6 +1327,16 @@ interface LlmModelReasoningInfo {
|
|
|
1328
1327
|
* can follow the cached history instead of rewriting message 0.
|
|
1329
1328
|
*/
|
|
1330
1329
|
type SystemPromptUpdate = 'in-history';
|
|
1330
|
+
/**
|
|
1331
|
+
* How a model accepts native tool declarations that change mid-conversation.
|
|
1332
|
+
* `'addition-only'`: the model reads a `tool-addition` block in a later
|
|
1333
|
+
* developer message as activating a tool declared with `deferLoading`, so an
|
|
1334
|
+
* added tool follows the cached history instead of rewriting the declaration
|
|
1335
|
+
* list. `'in-history'`: the model additionally reads `tool-removal` blocks,
|
|
1336
|
+
* so a removed tool keeps its declaration and the removal follows the history.
|
|
1337
|
+
* Absent means every request declares the complete current tool list.
|
|
1338
|
+
*/
|
|
1339
|
+
type ToolUpdate = 'in-history' | 'addition-only';
|
|
1331
1340
|
/** Exact-route model metadata resolved by its owning adapter. */
|
|
1332
1341
|
interface LlmResolvedModelInfo extends LlmModelInfo {
|
|
1333
1342
|
/** Provider-owned context capacity when known. */
|
|
@@ -1338,6 +1347,8 @@ interface LlmResolvedModelInfo extends LlmModelInfo {
|
|
|
1338
1347
|
reasoning?: LlmModelReasoningInfo;
|
|
1339
1348
|
/** Declared mid-conversation system prompt handling; absent means only a leading system message is read. */
|
|
1340
1349
|
systemPromptUpdate?: SystemPromptUpdate;
|
|
1350
|
+
/** Declared mid-conversation tool declaration handling; absent means every request declares the complete tool list. */
|
|
1351
|
+
toolUpdate?: ToolUpdate;
|
|
1341
1352
|
}
|
|
1342
1353
|
/**
|
|
1343
1354
|
* Adapter-private lossless-JSON state for replaying a successful response,
|
|
@@ -1426,6 +1437,18 @@ interface RequestUserInput {
|
|
|
1426
1437
|
}
|
|
1427
1438
|
/** A durable conversation message or a user input used only for one request. */
|
|
1428
1439
|
type RequestMessage = Message | RequestUserInput;
|
|
1440
|
+
/** Logged tool declarations and update identities since the last declaration reset. */
|
|
1441
|
+
interface ToolHistory {
|
|
1442
|
+
/** Complete active declarations at the start of this history. */
|
|
1443
|
+
readonly tools: readonly ToolSchema[];
|
|
1444
|
+
/** Ordered developer messages, with additions resolved from their historical headers. */
|
|
1445
|
+
readonly updates: readonly {
|
|
1446
|
+
/** Identity used to locate this update in the derived request history. */
|
|
1447
|
+
readonly messageId: MessageId;
|
|
1448
|
+
/** Added definitions resolved from the event's referenced request header. */
|
|
1449
|
+
readonly additions: readonly ToolSchema[];
|
|
1450
|
+
}[];
|
|
1451
|
+
}
|
|
1429
1452
|
/** A single model request, fully assembled. */
|
|
1430
1453
|
interface GenerateOptions {
|
|
1431
1454
|
/** Registered provider route selecting the adapter instance. */
|
|
@@ -1447,6 +1470,8 @@ interface GenerateOptions {
|
|
|
1447
1470
|
system?: string;
|
|
1448
1471
|
/** Tool schemas (adapters map to the provider's `tools` field). */
|
|
1449
1472
|
tools?: ToolSchema[];
|
|
1473
|
+
/** Session-folded tool history used for route projection; omission sends complete declarations without tool updates. */
|
|
1474
|
+
toolHistory?: ToolHistory;
|
|
1450
1475
|
temperature?: number;
|
|
1451
1476
|
maxTokens?: number;
|
|
1452
1477
|
/**
|
|
@@ -1884,6 +1909,8 @@ interface PreparedLlmCall {
|
|
|
1884
1909
|
readonly inputModalities?: readonly ModelModality[];
|
|
1885
1910
|
/** Exact model system prompt update mode captured with the adapter dispatch generation. */
|
|
1886
1911
|
readonly systemPromptUpdate?: SystemPromptUpdate;
|
|
1912
|
+
/** Exact model tool update mode captured with the adapter dispatch generation. */
|
|
1913
|
+
readonly toolUpdate?: ToolUpdate;
|
|
1887
1914
|
/** Config fields materialized by the captured adapter rather than proposed by the caller. */
|
|
1888
1915
|
readonly adapterDefaults: LlmCallConfigAdapterDefaults;
|
|
1889
1916
|
/**
|
|
@@ -1933,8 +1960,9 @@ declare abstract class LlmAdapter {
|
|
|
1933
1960
|
imageRequestPricing(_provider: string, _model: string): LlmImageRequestPricing | undefined;
|
|
1934
1961
|
/**
|
|
1935
1962
|
* List models this adapter can currently advertise for one owned provider.
|
|
1936
|
-
*
|
|
1937
|
-
*
|
|
1963
|
+
* Core routing accepts unlisted model ids; catalog-driven entry points such
|
|
1964
|
+
* as the GUI may require membership. Adapters used there must advertise
|
|
1965
|
+
* their available models; the base empty catalog offers no GUI selection.
|
|
1938
1966
|
* @param _provider - one provider route owned by this adapter.
|
|
1939
1967
|
* @returns discoverable models in adapter-preferred order.
|
|
1940
1968
|
*/
|
|
@@ -2122,7 +2150,8 @@ declare class LlmRuntime extends TypertRemoteService {
|
|
|
2122
2150
|
private detachedModalities;
|
|
2123
2151
|
/**
|
|
2124
2152
|
* Discover models advertised by one registered provider. Catalog membership
|
|
2125
|
-
*
|
|
2153
|
+
* does not constrain core routing. Catalog-driven entry points may restrict
|
|
2154
|
+
* selection and submission to the advertised models.
|
|
2126
2155
|
* @param provider - registered provider route to inspect.
|
|
2127
2156
|
* @returns detached model metadata in adapter-preferred order.
|
|
2128
2157
|
*/
|
|
@@ -2436,9 +2465,9 @@ interface RequestContext {
|
|
|
2436
2465
|
* Why a `request/header` snapshot was appended: `'initial'` — the log's first
|
|
2437
2466
|
* header (a new conversation); `'resume'` — a loop instance's first request
|
|
2438
2467
|
* over a log that already has header events (process restart, fork seed);
|
|
2439
|
-
* `'change'` — a later request used a different header
|
|
2440
|
-
*
|
|
2441
|
-
*
|
|
2468
|
+
* `'change'` — a later request used a different header; `'series'` — an unchanged
|
|
2469
|
+
* header began an explicitly distinct message series or followed a surface
|
|
2470
|
+
* replacement. Other reasons carry `startsSeries` when a new series coincides.
|
|
2442
2471
|
*/
|
|
2443
2472
|
type RequestHeaderReason = 'initial' | 'resume' | 'change' | 'series';
|
|
2444
2473
|
/**
|
|
@@ -2588,7 +2617,7 @@ interface SessionEventMap {
|
|
|
2588
2617
|
'request/header': {
|
|
2589
2618
|
header: EpochHeader;
|
|
2590
2619
|
reason: RequestHeaderReason;
|
|
2591
|
-
/**
|
|
2620
|
+
/** This request begins a distinct model-message series, independently of the header reason. */
|
|
2592
2621
|
startsSeries?: true;
|
|
2593
2622
|
};
|
|
2594
2623
|
/**
|
|
@@ -2974,6 +3003,16 @@ declare class Session {
|
|
|
2974
3003
|
* @returns the latest immutable route metadata.
|
|
2975
3004
|
*/
|
|
2976
3005
|
requestContext(): RequestContext | undefined;
|
|
3006
|
+
/** Cached historical tool definitions and updates for request projection. */
|
|
3007
|
+
private readonly toolHistoryProjection;
|
|
3008
|
+
/** Index of the next committed event not yet consumed by the tool-history fold. */
|
|
3009
|
+
private toolHistorySeq;
|
|
3010
|
+
/**
|
|
3011
|
+
* Fold unseen committed events into capability-independent tool history.
|
|
3012
|
+
* Initial access reconstructs inherited history; later reads consume only new events.
|
|
3013
|
+
* @returns an immutable snapshot for LLM request projection, including historical addition definitions.
|
|
3014
|
+
*/
|
|
3015
|
+
toolHistory(): ToolHistory;
|
|
2977
3016
|
/** The derived-message cache: frozen projections, extended per unseen node. */
|
|
2978
3017
|
private derived;
|
|
2979
3018
|
/** Surface position (nodes projected) the cache has reached. */
|
|
@@ -3182,7 +3221,10 @@ interface SessionRowsPage {
|
|
|
3182
3221
|
page: number;
|
|
3183
3222
|
pageSize: number;
|
|
3184
3223
|
}
|
|
3185
|
-
/**
|
|
3224
|
+
/**
|
|
3225
|
+
* 时间范围的语义键(与 session-rdb `./usage` 的 `UsageRangeKey` 镜像):`day` / `week` 是本地自然日 /
|
|
3226
|
+
* 自然周,`7d` / `30d` / `90d` 是最近 N 个自然日(含今天)——边界由 host 按本地时区算,客户端只传语义。
|
|
3227
|
+
*/
|
|
3186
3228
|
type UsageRangeKey = "all" | "day" | "week" | "7d" | "30d" | "90d";
|
|
3187
3229
|
/** 活动计数(与 session-rdb `./usage` 的回报结构镜像):轮次 / 步骤 / 用户输入 / 工具调用。 */
|
|
3188
3230
|
interface UsageActivityTotals {
|
package/dist/client.d.mts
CHANGED
|
@@ -1096,9 +1096,8 @@ interface ToolRemovalBlock {
|
|
|
1096
1096
|
}
|
|
1097
1097
|
/**
|
|
1098
1098
|
* Merge-extensible content blocks keyed by `type`. New core blocks must land
|
|
1099
|
-
* with adapter, UI, and compaction support.
|
|
1100
|
-
*
|
|
1101
|
-
* their producers and consumers are implemented together.
|
|
1099
|
+
* with adapter, UI, and compaction support. Tool-change blocks belong to
|
|
1100
|
+
* developer messages; `projectToolUpdates` selects what each route receives.
|
|
1102
1101
|
*/
|
|
1103
1102
|
interface ContentBlockMap {
|
|
1104
1103
|
'text': TextBlock;
|
|
@@ -1328,6 +1327,16 @@ interface LlmModelReasoningInfo {
|
|
|
1328
1327
|
* can follow the cached history instead of rewriting message 0.
|
|
1329
1328
|
*/
|
|
1330
1329
|
type SystemPromptUpdate = 'in-history';
|
|
1330
|
+
/**
|
|
1331
|
+
* How a model accepts native tool declarations that change mid-conversation.
|
|
1332
|
+
* `'addition-only'`: the model reads a `tool-addition` block in a later
|
|
1333
|
+
* developer message as activating a tool declared with `deferLoading`, so an
|
|
1334
|
+
* added tool follows the cached history instead of rewriting the declaration
|
|
1335
|
+
* list. `'in-history'`: the model additionally reads `tool-removal` blocks,
|
|
1336
|
+
* so a removed tool keeps its declaration and the removal follows the history.
|
|
1337
|
+
* Absent means every request declares the complete current tool list.
|
|
1338
|
+
*/
|
|
1339
|
+
type ToolUpdate = 'in-history' | 'addition-only';
|
|
1331
1340
|
/** Exact-route model metadata resolved by its owning adapter. */
|
|
1332
1341
|
interface LlmResolvedModelInfo extends LlmModelInfo {
|
|
1333
1342
|
/** Provider-owned context capacity when known. */
|
|
@@ -1338,6 +1347,8 @@ interface LlmResolvedModelInfo extends LlmModelInfo {
|
|
|
1338
1347
|
reasoning?: LlmModelReasoningInfo;
|
|
1339
1348
|
/** Declared mid-conversation system prompt handling; absent means only a leading system message is read. */
|
|
1340
1349
|
systemPromptUpdate?: SystemPromptUpdate;
|
|
1350
|
+
/** Declared mid-conversation tool declaration handling; absent means every request declares the complete tool list. */
|
|
1351
|
+
toolUpdate?: ToolUpdate;
|
|
1341
1352
|
}
|
|
1342
1353
|
/**
|
|
1343
1354
|
* Adapter-private lossless-JSON state for replaying a successful response,
|
|
@@ -1426,6 +1437,18 @@ interface RequestUserInput {
|
|
|
1426
1437
|
}
|
|
1427
1438
|
/** A durable conversation message or a user input used only for one request. */
|
|
1428
1439
|
type RequestMessage = Message | RequestUserInput;
|
|
1440
|
+
/** Logged tool declarations and update identities since the last declaration reset. */
|
|
1441
|
+
interface ToolHistory {
|
|
1442
|
+
/** Complete active declarations at the start of this history. */
|
|
1443
|
+
readonly tools: readonly ToolSchema[];
|
|
1444
|
+
/** Ordered developer messages, with additions resolved from their historical headers. */
|
|
1445
|
+
readonly updates: readonly {
|
|
1446
|
+
/** Identity used to locate this update in the derived request history. */
|
|
1447
|
+
readonly messageId: MessageId;
|
|
1448
|
+
/** Added definitions resolved from the event's referenced request header. */
|
|
1449
|
+
readonly additions: readonly ToolSchema[];
|
|
1450
|
+
}[];
|
|
1451
|
+
}
|
|
1429
1452
|
/** A single model request, fully assembled. */
|
|
1430
1453
|
interface GenerateOptions {
|
|
1431
1454
|
/** Registered provider route selecting the adapter instance. */
|
|
@@ -1447,6 +1470,8 @@ interface GenerateOptions {
|
|
|
1447
1470
|
system?: string;
|
|
1448
1471
|
/** Tool schemas (adapters map to the provider's `tools` field). */
|
|
1449
1472
|
tools?: ToolSchema[];
|
|
1473
|
+
/** Session-folded tool history used for route projection; omission sends complete declarations without tool updates. */
|
|
1474
|
+
toolHistory?: ToolHistory;
|
|
1450
1475
|
temperature?: number;
|
|
1451
1476
|
maxTokens?: number;
|
|
1452
1477
|
/**
|
|
@@ -1884,6 +1909,8 @@ interface PreparedLlmCall {
|
|
|
1884
1909
|
readonly inputModalities?: readonly ModelModality[];
|
|
1885
1910
|
/** Exact model system prompt update mode captured with the adapter dispatch generation. */
|
|
1886
1911
|
readonly systemPromptUpdate?: SystemPromptUpdate;
|
|
1912
|
+
/** Exact model tool update mode captured with the adapter dispatch generation. */
|
|
1913
|
+
readonly toolUpdate?: ToolUpdate;
|
|
1887
1914
|
/** Config fields materialized by the captured adapter rather than proposed by the caller. */
|
|
1888
1915
|
readonly adapterDefaults: LlmCallConfigAdapterDefaults;
|
|
1889
1916
|
/**
|
|
@@ -1933,8 +1960,9 @@ declare abstract class LlmAdapter {
|
|
|
1933
1960
|
imageRequestPricing(_provider: string, _model: string): LlmImageRequestPricing | undefined;
|
|
1934
1961
|
/**
|
|
1935
1962
|
* List models this adapter can currently advertise for one owned provider.
|
|
1936
|
-
*
|
|
1937
|
-
*
|
|
1963
|
+
* Core routing accepts unlisted model ids; catalog-driven entry points such
|
|
1964
|
+
* as the GUI may require membership. Adapters used there must advertise
|
|
1965
|
+
* their available models; the base empty catalog offers no GUI selection.
|
|
1938
1966
|
* @param _provider - one provider route owned by this adapter.
|
|
1939
1967
|
* @returns discoverable models in adapter-preferred order.
|
|
1940
1968
|
*/
|
|
@@ -2122,7 +2150,8 @@ declare class LlmRuntime extends TypertRemoteService {
|
|
|
2122
2150
|
private detachedModalities;
|
|
2123
2151
|
/**
|
|
2124
2152
|
* Discover models advertised by one registered provider. Catalog membership
|
|
2125
|
-
*
|
|
2153
|
+
* does not constrain core routing. Catalog-driven entry points may restrict
|
|
2154
|
+
* selection and submission to the advertised models.
|
|
2126
2155
|
* @param provider - registered provider route to inspect.
|
|
2127
2156
|
* @returns detached model metadata in adapter-preferred order.
|
|
2128
2157
|
*/
|
|
@@ -2436,9 +2465,9 @@ interface RequestContext {
|
|
|
2436
2465
|
* Why a `request/header` snapshot was appended: `'initial'` — the log's first
|
|
2437
2466
|
* header (a new conversation); `'resume'` — a loop instance's first request
|
|
2438
2467
|
* over a log that already has header events (process restart, fork seed);
|
|
2439
|
-
* `'change'` — a later request used a different header
|
|
2440
|
-
*
|
|
2441
|
-
*
|
|
2468
|
+
* `'change'` — a later request used a different header; `'series'` — an unchanged
|
|
2469
|
+
* header began an explicitly distinct message series or followed a surface
|
|
2470
|
+
* replacement. Other reasons carry `startsSeries` when a new series coincides.
|
|
2442
2471
|
*/
|
|
2443
2472
|
type RequestHeaderReason = 'initial' | 'resume' | 'change' | 'series';
|
|
2444
2473
|
/**
|
|
@@ -2588,7 +2617,7 @@ interface SessionEventMap {
|
|
|
2588
2617
|
'request/header': {
|
|
2589
2618
|
header: EpochHeader;
|
|
2590
2619
|
reason: RequestHeaderReason;
|
|
2591
|
-
/**
|
|
2620
|
+
/** This request begins a distinct model-message series, independently of the header reason. */
|
|
2592
2621
|
startsSeries?: true;
|
|
2593
2622
|
};
|
|
2594
2623
|
/**
|
|
@@ -2974,6 +3003,16 @@ declare class Session {
|
|
|
2974
3003
|
* @returns the latest immutable route metadata.
|
|
2975
3004
|
*/
|
|
2976
3005
|
requestContext(): RequestContext | undefined;
|
|
3006
|
+
/** Cached historical tool definitions and updates for request projection. */
|
|
3007
|
+
private readonly toolHistoryProjection;
|
|
3008
|
+
/** Index of the next committed event not yet consumed by the tool-history fold. */
|
|
3009
|
+
private toolHistorySeq;
|
|
3010
|
+
/**
|
|
3011
|
+
* Fold unseen committed events into capability-independent tool history.
|
|
3012
|
+
* Initial access reconstructs inherited history; later reads consume only new events.
|
|
3013
|
+
* @returns an immutable snapshot for LLM request projection, including historical addition definitions.
|
|
3014
|
+
*/
|
|
3015
|
+
toolHistory(): ToolHistory;
|
|
2977
3016
|
/** The derived-message cache: frozen projections, extended per unseen node. */
|
|
2978
3017
|
private derived;
|
|
2979
3018
|
/** Surface position (nodes projected) the cache has reached. */
|
|
@@ -3182,7 +3221,10 @@ interface SessionRowsPage {
|
|
|
3182
3221
|
page: number;
|
|
3183
3222
|
pageSize: number;
|
|
3184
3223
|
}
|
|
3185
|
-
/**
|
|
3224
|
+
/**
|
|
3225
|
+
* 时间范围的语义键(与 session-rdb `./usage` 的 `UsageRangeKey` 镜像):`day` / `week` 是本地自然日 /
|
|
3226
|
+
* 自然周,`7d` / `30d` / `90d` 是最近 N 个自然日(含今天)——边界由 host 按本地时区算,客户端只传语义。
|
|
3227
|
+
*/
|
|
3186
3228
|
type UsageRangeKey = "all" | "day" | "week" | "7d" | "30d" | "90d";
|
|
3187
3229
|
/** 活动计数(与 session-rdb `./usage` 的回报结构镜像):轮次 / 步骤 / 用户输入 / 工具调用。 */
|
|
3188
3230
|
interface UsageActivityTotals {
|
package/locale/en.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"title": "Conversation Manager",
|
|
4
|
-
"description": "Full-page panel
|
|
4
|
+
"description": "Full-page conversation management panel (browser half): search across sessions, unarchive, delete and import as a new session."
|
|
5
5
|
}
|
|
6
6
|
}
|
package/locale/zh.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@morlay/ui-conversation-manager",
|
|
3
|
-
"version": "0.0.2-alpha.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.0.2-alpha.9",
|
|
4
|
+
"description": "「对话管理」全局面板页(浏览器半):会话(含已归档)的搜索、取消归档、删除,以及导入为新会话。",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"archived-sessions",
|
|
7
7
|
"conversation-manager",
|
|
@@ -39,18 +39,18 @@
|
|
|
39
39
|
"react-dom": "^18.2.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@deepseek-ai/cordis": "4.0.4",
|
|
43
|
-
"@deepseek-ai/dsh-api-session-controller": "0.1.7-
|
|
44
|
-
"@deepseek-ai/dsh-client-locale": "0.1.7-
|
|
45
|
-
"@deepseek-ai/dsh-client-ui-layout": "0.1.7-
|
|
46
|
-
"@deepseek-ai/dsh-client-ui-primitives": "0.1.7-
|
|
47
|
-
"@deepseek-ai/dsh-client-ui-renderer": "0.1.7-
|
|
48
|
-
"@deepseek-ai/dsh-client-ui-session": "0.1.7-
|
|
49
|
-
"@deepseek-ai/dsh-client-ui-sidebar": "0.1.7-
|
|
50
|
-
"@deepseek-ai/dsh-client-ui-slots": "0.1.7-
|
|
51
|
-
"@deepseek-ai/dsh-client-ui-workspace": "0.1.7-
|
|
52
|
-
"@deepseek-ai/dsh-session": "0.1.7-
|
|
53
|
-
"@morlay/dsh-client-ui-primitives": "0.0.2-alpha.
|
|
42
|
+
"@deepseek-ai/cordis": "^4.0.4",
|
|
43
|
+
"@deepseek-ai/dsh-api-session-controller": "^0.1.7-rc.2",
|
|
44
|
+
"@deepseek-ai/dsh-client-locale": "^0.1.7-rc.2",
|
|
45
|
+
"@deepseek-ai/dsh-client-ui-layout": "^0.1.7-rc.2",
|
|
46
|
+
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.7-rc.2",
|
|
47
|
+
"@deepseek-ai/dsh-client-ui-renderer": "^0.1.7-rc.2",
|
|
48
|
+
"@deepseek-ai/dsh-client-ui-session": "^0.1.7-rc.2",
|
|
49
|
+
"@deepseek-ai/dsh-client-ui-sidebar": "^0.1.7-rc.2",
|
|
50
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.7-rc.2",
|
|
51
|
+
"@deepseek-ai/dsh-client-ui-workspace": "^0.1.7-rc.2",
|
|
52
|
+
"@deepseek-ai/dsh-session": "^0.1.7-rc.2",
|
|
53
|
+
"@morlay/dsh-client-ui-primitives": "0.0.2-alpha.9"
|
|
54
54
|
},
|
|
55
55
|
"dsh": {
|
|
56
56
|
"client": {
|
package/src/client/controller.ts
CHANGED
|
@@ -41,7 +41,10 @@ export interface SessionRowsPage {
|
|
|
41
41
|
pageSize: number;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* 时间范围的语义键(与 session-rdb `./usage` 的 `UsageRangeKey` 镜像):`day` / `week` 是本地自然日 /
|
|
46
|
+
* 自然周,`7d` / `30d` / `90d` 是最近 N 个自然日(含今天)——边界由 host 按本地时区算,客户端只传语义。
|
|
47
|
+
*/
|
|
45
48
|
export type UsageRangeKey = "all" | "day" | "week" | "7d" | "30d" | "90d";
|
|
46
49
|
|
|
47
50
|
/** 活动计数(与 session-rdb `./usage` 的回报结构镜像):轮次 / 步骤 / 用户输入 / 工具调用。 */
|