codexmate 0.1.34 → 0.1.35

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.
Files changed (47) hide show
  1. package/README.md +15 -1
  2. package/README.vi.md +15 -1
  3. package/README.zh.md +15 -1
  4. package/cli/analytics-export-args.js +7 -0
  5. package/cli/session-usage.js +4 -1
  6. package/cli.js +29 -5
  7. package/lib/data/model-prices.json +1868 -0
  8. package/lib/session-context-health.js +5 -1
  9. package/lib/session-evidence-collections.js +85 -0
  10. package/lib/session-features.js +15 -0
  11. package/lib/session-project-git.js +65 -0
  12. package/lib/session-projects.js +12 -1
  13. package/lib/session-stories.js +67 -0
  14. package/lib/session-usage-ledger.js +77 -0
  15. package/lib/session-usage-pricing.js +42 -0
  16. package/lib/session-usage-report.js +101 -0
  17. package/package.json +4 -1
  18. package/plugins/prompt-templates/computed.mjs +9 -0
  19. package/web-ui/app.js +10 -0
  20. package/web-ui/logic.session-artifacts.mjs +39 -0
  21. package/web-ui/modules/app.methods.agents.mjs +3 -2
  22. package/web-ui/modules/app.methods.session-browser.mjs +35 -0
  23. package/web-ui/modules/app.methods.system-prompt.mjs +16 -7
  24. package/web-ui/modules/app.methods.web-ui-preferences.mjs +5 -0
  25. package/web-ui/modules/i18n/locales/en.mjs +116 -1
  26. package/web-ui/modules/i18n/locales/ja.mjs +116 -1
  27. package/web-ui/modules/i18n/locales/vi.mjs +116 -1
  28. package/web-ui/modules/i18n/locales/zh-tw.mjs +116 -1
  29. package/web-ui/modules/i18n/locales/zh.mjs +116 -1
  30. package/web-ui/modules/session-collections.mjs +65 -0
  31. package/web-ui/modules/session-evidence.mjs +81 -0
  32. package/web-ui/modules/session-features.mjs +15 -1
  33. package/web-ui/modules/session-git.mjs +39 -0
  34. package/web-ui/modules/session-stories.mjs +64 -0
  35. package/web-ui/modules/usage-pricing.mjs +30 -0
  36. package/web-ui/partials/index/layout-footer.html +1 -1
  37. package/web-ui/partials/index/panel-sessions.html +20 -20
  38. package/web-ui/partials/index/panel-usage.html +2 -0
  39. package/web-ui/partials/index/session-features.html +82 -2
  40. package/web-ui/partials/index/thread-handoff.html +73 -62
  41. package/web-ui/partials/index/usage-records.html +41 -0
  42. package/web-ui/res/web-ui-render.precompiled.js +772 -125
  43. package/web-ui/styles/session-features.css +63 -0
  44. package/web-ui/styles/sessions-list.css +74 -0
  45. package/web-ui/styles/sessions-preview.css +106 -68
  46. package/web-ui/styles/sessions-usage.css +8 -0
  47. package/web-ui/styles/theme-violet.css +9 -3
@@ -1087,10 +1087,11 @@ export function createAgentsMethods(options = {}) {
1087
1087
  });
1088
1088
  },
1089
1089
 
1090
- loadPromptsTabContent() {
1090
+ async loadPromptsTabContent() {
1091
1091
  if (typeof this.loadPromptsPathReferences === "function") this.loadPromptsPathReferences();
1092
1092
  if (this.promptsSubTab === 'system') {
1093
- if (typeof this.loadSystemPromptFiles === 'function') this.loadSystemPromptFiles();
1093
+ const didLoadFallback = typeof this.loadSystemPromptFiles === 'function' && await this.loadSystemPromptFiles();
1094
+ if (this.promptsSubTab !== 'system' || didLoadFallback) return;
1094
1095
  if (this.sysPromptLoading || this.sysPromptSaving || this.sysPromptDiffVisible || this.hasSysPromptContentChanged()) return;
1095
1096
  if (typeof this.loadSystemPrompt === 'function') this.loadSystemPrompt();
1096
1097
  } else {
@@ -828,6 +828,40 @@ export function createSessionBrowserMethods(options = {}) {
828
828
  }
829
829
  },
830
830
 
831
+ toggleUsageRecords(event) {
832
+ this.usageRecordsOpen = event.target.open;
833
+ if (this.usageRecordsOpen) return this.loadUsageRecords();
834
+ },
835
+ formatUsageRecordCount(value) {
836
+ return value === null ? this.t('usage.records.unknown') : Number(value || 0).toLocaleString('en-US');
837
+ },
838
+ async loadUsageRecords(options = {}) {
839
+ if (this.usageRecordsLoading) return;
840
+ const range = this.sessionsUsageTimeRange;
841
+ if (!options.forceRefresh && this.usageRecords && this.usageRecordsRange === range) return;
842
+ this.usageRecordsLoading = true;
843
+ this.usageRecordsError = '';
844
+ if (this.usageRecordsRange !== range) this.usageRecords = null;
845
+ const today = new Date();
846
+ const from = new Date(Date.UTC(today.getUTCFullYear(), today.getUTCMonth(), today.getUTCDate() - (range === '30d' ? 29 : 6)));
847
+ try {
848
+ const report = await api('read-sessions-usage-report', { source: 'all',
849
+ limit: range === 'all' ? 2000 : (range === '30d' ? 1200 : 600),
850
+ ...(range === 'all' ? {} : { from: from.toISOString().slice(0, 10), to: today.toISOString().slice(0, 10) }),
851
+ forceRefresh: !!options.forceRefresh });
852
+ if (report.error) throw new Error(report.error);
853
+ if (range === this.sessionsUsageTimeRange) {
854
+ this.usageRecords = report;
855
+ this.usageRecordsRange = range;
856
+ }
857
+ } catch (error) {
858
+ if (range === this.sessionsUsageTimeRange) this.usageRecordsError = error.message;
859
+ } finally {
860
+ this.usageRecordsLoading = false;
861
+ if (this.usageRecordsOpen && range !== this.sessionsUsageTimeRange) return this.loadUsageRecords();
862
+ }
863
+ },
864
+
831
865
  async loadSessionsUsage(options = {}) {
832
866
  if (this.sessionsUsageLoading) return;
833
867
  const normalizedRange = typeof options.range === 'string'
@@ -865,6 +899,7 @@ export function createSessionBrowserMethods(options = {}) {
865
899
  return;
866
900
  }
867
901
  this.sessionsUsageList = Array.isArray(res.sessions) ? res.sessions : [];
902
+ if (this.usageRecordsOpen) void this.loadUsageRecords({ forceRefresh: !!options.forceRefresh });
868
903
  loadSucceeded = true;
869
904
  } catch (e) {
870
905
  this.sessionsUsageError = '加载 usage 统计失败';
@@ -36,8 +36,12 @@ export function createSystemPromptMethods(options = {}) {
36
36
  return false;
37
37
  },
38
38
 
39
- async loadSystemPromptFiles() {
40
- if (this.sysPromptFilesLoading) return;
39
+ loadSystemPromptFiles() {
40
+ if (!this.sysPromptFilesLoading) this._sysPromptFilesPromise = this.refreshSystemPromptFiles();
41
+ return this._sysPromptFilesPromise;
42
+ },
43
+
44
+ async refreshSystemPromptFiles() {
41
45
  const scope = this.sysPromptScope || 'global';
42
46
  const token = issueLatestRequestToken(this, '_sysPromptFilesRequestToken');
43
47
  this.sysPromptFilesLoading = true;
@@ -47,6 +51,11 @@ export function createSystemPromptMethods(options = {}) {
47
51
  if (result.error) throw new Error(result.error);
48
52
  this.sysPromptFiles = result.files;
49
53
  const isListed = result.files.some(file => file.filename === this.currentSysPromptFileName());
54
+ if (!isListed && result.files.length && !this.hasSysPromptContentChanged()
55
+ && !this.sysPromptLoading && !this.sysPromptSaving && !this.sysPromptDiffVisible) {
56
+ await this.switchSysPromptFileName(result.files[0].filename);
57
+ return true;
58
+ }
50
59
  if (!isListed) this.sysPromptFileMissing = true;
51
60
  this.sysPromptFilesError = !isListed ? this.t('sysPrompt.fileMissing')
52
61
  : (this.sysPromptFileMissing ? this.sysPromptFilesError : '');
@@ -67,21 +76,21 @@ export function createSystemPromptMethods(options = {}) {
67
76
  if (filename === 'SYSTEM.md') this.sysPromptMode = 'system';
68
77
  if (filename === 'APPEND_SYSTEM.md') this.sysPromptMode = 'append';
69
78
  this.closeSysHistory();
70
- this.loadSystemPrompt();
79
+ return this.loadSystemPrompt();
71
80
  },
72
81
 
73
- switchSysPromptScope(scope) {
82
+ async switchSysPromptScope(scope) {
74
83
  if (!this.canSwitchSysPromptTarget()) return;
75
84
  const normalized = scope === 'project' ? scope : 'global';
76
85
  if (normalized === this.sysPromptScope) return;
77
86
  this.sysPromptScope = normalized;
78
- this.sysPromptFileName = '';
79
87
  this.sysPromptFiles = [];
80
88
  this._sysPromptFilesRequestToken = null;
81
89
  this.sysPromptFilesLoading = false;
82
90
  this.closeSysHistory();
83
- this.loadSystemPromptFiles();
84
- this.loadSystemPrompt();
91
+ const didLoadFallback = await this.loadSystemPromptFiles();
92
+ if (normalized !== this.sysPromptScope || didLoadFallback) return;
93
+ return this.loadSystemPrompt();
85
94
  },
86
95
 
87
96
  switchSysPromptMode(mode) {
@@ -349,6 +349,8 @@ export function createWebUiPreferencesMethods(options = {}) {
349
349
  promptsPreviewCollapsed: normalizeBoolean(hasOwn(source, 'promptsPreviewCollapsed') ? source.promptsPreviewCollapsed : this.promptsPreviewCollapsed, true),
350
350
  sysPromptScope: normalizeSysPromptScope(hasOwn(source, 'sysPromptScope') ? source.sysPromptScope : this.sysPromptScope),
351
351
  sysPromptMode: normalizeSysPromptMode(hasOwn(source, 'sysPromptMode') ? source.sysPromptMode : this.sysPromptMode),
352
+ sysPromptFileName: typeof source.sysPromptFileName === 'string'
353
+ ? source.sysPromptFileName : (this.sysPromptFileName || ''),
352
354
  promptPresets: normalizePromptPresets(hasOwn(source, 'promptPresets') ? source.promptPresets : this.promptPresets),
353
355
  projectClaudeMdPath: typeof source.projectClaudeMdPath === 'string'
354
356
  ? source.projectClaudeMdPath
@@ -416,6 +418,9 @@ export function createWebUiPreferencesMethods(options = {}) {
416
418
  if (typeof source.sysPromptMode === 'string') {
417
419
  this.sysPromptMode = normalizeSysPromptMode(source.sysPromptMode);
418
420
  }
421
+ if (typeof source.sysPromptFileName === 'string') {
422
+ this.sysPromptFileName = source.sysPromptFileName;
423
+ }
419
424
  if (Array.isArray(source.promptPresets)) {
420
425
  this.promptPresets = normalizePromptPresets(source.promptPresets);
421
426
  if (this.selectedPromptPresetId && !this.promptPresets.some(preset => preset.id === this.selectedPromptPresetId)) {
@@ -127,7 +127,11 @@ const en = Object.freeze({
127
127
  "features.index": "Full-text index",
128
128
  "features.refreshIndex": "Refresh index",
129
129
  "features.indexStatus": "{count} sessions indexed; refresh {processed}/{total}",
130
- "features.indexScope": "Covers discovered candidates only. Uses source, project and role filters above. Refresh for new messages.",
130
+ "features.indexCatalogTime": "Index catalog updated (UTC): {time}",
131
+ "features.indexSourceCoverage": "{source}: {count} candidates discovered; discovery limit {limit}",
132
+ "features.indexUnknown": "Unknown",
133
+ "features.indexCoverageUnknown": "No coverage record for the current source. Refresh the index.",
134
+ "features.indexScope": "Search covers indexed candidates, not all history or new messages. Catalog time is not a per-source sync time. Uses source, project and role filters above. Refresh for new messages.",
131
135
  "features.indexFailures": "{count} read failures; these records are not covered",
132
136
  "features.coverage": "Searched {scanned}/{total} indexed sessions",
133
137
  "features.partial": "Partial coverage; at most 100 matches are shown",
@@ -1133,6 +1137,21 @@ const en = Object.freeze({
1133
1137
  'sessions.roleLabel.assistant': 'Assistant',
1134
1138
 
1135
1139
  // Usage panel
1140
+ "usage.records.title": "Usage record breakdown",
1141
+ "usage.records.scope": "Records use UTC dates: Codex cumulative deltas, Claude/Pi assistant usage and Gemini tokens from supported JSON sessions. Gemini totals include reasoning/tool tokens; cache reads are an input subset. Missing fields stay unknown. Existing charts use session update dates. Full-text estimates stay separate and do not represent cost.",
1142
+ "usage.records.coverage": "Scanned {scanned}/{candidates} candidate sessions; {unreported} without usage records, {unsupported} with unsupported record sources.",
1143
+ "usage.records.failed": "{count} sessions failed to load. Results are incomplete; refresh to retry.",
1144
+ "usage.records.total": "Recorded tokens",
1145
+ "usage.records.estimated": "Full-text estimated tokens",
1146
+ "usage.records.cacheRead": "Cache read",
1147
+ "usage.records.cacheWrite": "Cache write",
1148
+ "usage.records.unknown": "Unknown",
1149
+ "usage.records.date": "Date (UTC)",
1150
+ "usage.records.source": "Source",
1151
+ "usage.records.model": "Model",
1152
+ "usage.records.input": "Input",
1153
+ "usage.records.output": "Output",
1154
+ "usage.records.undated": "Tokens without record timestamps: {tokens}; not assigned to a day.",
1136
1155
  'usage.overview': 'Usage Overview',
1137
1156
  'usage.range.aria': 'Usage time range',
1138
1157
  'usage.range.7d': 'Last 7 days',
@@ -1865,6 +1884,102 @@ const en = Object.freeze({
1865
1884
  'sysPrompt.hint.unsaved': 'Unsaved changes detected',
1866
1885
  'sysPrompt.hint.twoStepSave': 'Click preview to see the diff, then confirm to save.',
1867
1886
  'sysPrompt.toast.saved': 'System prompt saved',
1887
+ "evidence.title": "Cross-session evidence pack",
1888
+ "evidence.select": "Add to evidence pack",
1889
+ "evidence.remove": "Remove",
1890
+ "evidence.goal": "Handoff goal",
1891
+ "evidence.generate": "Generate evidence pack",
1892
+ "evidence.preview": "Preview ({count} characters)",
1893
+ "evidence.download": "Download Markdown",
1894
+ "evidence.memory": "Selections stay in this page only; reload clears them, not original records.",
1895
+ "evidence.scope": "Extracted historical selections only; not sent, current version not verified.",
1896
+ "evidence.path": "Source path",
1897
+ "evidence.status": "Historical evidence status",
1898
+ "evidence.passed": "Historical tool log reports success; current version unverified",
1899
+ "evidence.failed": "Historical tool log reports failure",
1900
+ "evidence.unverified": "Needs review",
1901
+ "evidence.changed": "Source changed; update the index and select again.",
1902
+ "evidence.limit": "Select up to 100 items.",
1903
+ "artifacts.format": "Output format",
1904
+ "artifacts.receipt": "Development receipt",
1905
+ "artifacts.relay": "Multi-agent relay pack",
1906
+ "artifacts.generate.receipt": "Generate development receipt",
1907
+ "artifacts.generate.relay": "Generate relay pack",
1908
+ "artifacts.scope": "Generated locally from selected historical material only. Not sent or executed; the current version has not been accepted.",
1909
+ "artifacts.goal": "Goal (user supplied)",
1910
+ "artifacts.note": "Additional notes (user supplied, optional)",
1911
+ "artifacts.notePlaceholder": "Add a change reason, next step or acceptance criteria; notes are not verification evidence.",
1912
+ "artifacts.unspecified": "Not supplied; add manually.",
1913
+ "artifacts.checks": "Historical check records",
1914
+ "artifacts.noVerdict": "Record counts do not prove task completion or passing tests on the current version. Source excerpts follow.",
1915
+ "artifacts.sources": "Selected material and sources",
1916
+ "artifacts.executor": "Stage 1: Executor",
1917
+ "artifacts.executorTask": "Check the goal, original sources and authorized scope. Act only with explicit authorization; stop for unclear goals or invalid sources. Report actual changes, checks, failures and unverified items. Do not replay historical commands.",
1918
+ "artifacts.reviewer": "Stage 2: Reviewer",
1919
+ "artifacts.reviewerTask": "Review executor results, original sources and the current version read-only. Separate facts, inferences and missing evidence. Delivery or self-reported reading does not mean completion. List the remaining manual acceptance steps.",
1920
+ "artifacts.uat": "Manual UAT: pending, not accepted",
1921
+ "artifacts.uatTask": "Retest the goal through its real entry on the version under review. Record observable results and failure criteria. Historical logs, handoffs and self-reported reading do not replace current acceptance.",
1922
+
1923
+ "collections.title": "Evidence collections",
1924
+ "collections.scope": "Only explicitly saved names, goals and source references persist. Opening replaces the temporary basket; reload requires reopening. Original sessions are not backed up.",
1925
+ "collections.name": "Collection name",
1926
+ "collections.save": "Save collection",
1927
+ "collections.saveAs": "Save as new",
1928
+ "collections.remove": "Remove collection",
1929
+ "collections.refresh": "Refresh collections",
1930
+ "collections.empty": "No saved collections",
1931
+ "collections.state.ready": "Source matches",
1932
+ "collections.state.changed": "Source changed",
1933
+ "collections.state.unavailable": "Source unavailable",
1934
+ "stories.title": "Development story",
1935
+ "stories.scope": "Explicit user links do not prove authorship or passing tests. Local metadata only; no Git writes or uploads.",
1936
+ "stories.linked": "User-linked",
1937
+ "stories.unavailable": "Session is outside current discovered candidates",
1938
+ "stories.session": "Linked session",
1939
+ "stories.choose": "Choose a current project session",
1940
+ "stories.note": "Reason for change",
1941
+ "stories.save": "Save link",
1942
+ "stories.remove": "Remove link",
1943
+ "stories.refresh": "Refresh links",
1944
+ "features.error.collection-input-invalid": "Check the collection name, goal and selected references",
1945
+ "features.error.collection-not-found": "Collection was removed; refresh the list",
1946
+ "features.error.collection-source-unavailable": "Source changed or is unavailable; update the index and reselect",
1947
+ "features.error.story-input-invalid": "Check the project, full commit SHA and note",
1948
+ "features.error.story-project-unavailable": "Project is outside current discovery",
1949
+ "features.error.story-session-unavailable": "Session is outside current project candidates",
1950
+ "features.error.story-not-found": "Link was removed; refresh the list",
1951
+ "features.error.project-git-commit-invalid": "Commit is outside the current project’s latest 30 commits",
1952
+
1953
+ "pricing.title": "Cost reference (USD)",
1954
+ "pricing.scope": "Estimate using bundled base text-token rates, not a bill. Excludes tiers, service levels, cache durations, tools and multimodal extras; does not infer historical billing providers.",
1955
+ "pricing.total": "Reference total",
1956
+ "pricing.subtotal": "Known-row subtotal",
1957
+ "pricing.coverage": "Priced {known}; unknown {unknown}; failed {failed}; unreported {unreported}; unsupported {unsupported}",
1958
+ "pricing.basis": "Basis",
1959
+ "pricing.rates": "Per million tokens: input {input} / output {output} / cache read {cached} / cache write {created}",
1960
+ "pricing.download": "Download price reference JSON",
1961
+ "pricing.reason.base-rate": "Base-rate estimate",
1962
+ "pricing.reason.model-unknown": "Model price unknown",
1963
+ "pricing.reason.usage-incomplete": "Incomplete token categories",
1964
+ "pricing.reason.usage-unclassified": "Unclassified tokens",
1965
+ "pricing.reason.rate-missing": "Category rate missing",
1966
+
1967
+ "git.title": "Git change associations (read-only)",
1968
+ "git.scope": "Inspect the current project repository. Candidates are commits within 24 hours of session update time, not causation or passed tests. Never writes Git or uploads sessions.",
1969
+ "git.detached": "Detached HEAD",
1970
+ "git.noHead": "No commits",
1971
+ "git.changes": "{count} changed files",
1972
+ "git.truncated": "Limited to 30 commits and 50 changed files; this list is truncated.",
1973
+ "git.candidate": "Time-based candidate",
1974
+ "git.refresh": "Refresh Git",
1975
+ "git.status.ready": "Current Git state loaded",
1976
+ "git.status.unborn": "Repository has no commits",
1977
+ "git.status.not-repository": "Not a Git repository",
1978
+ "git.status.path-unavailable": "Project path unavailable",
1979
+ "git.status.git-unavailable": "Git not found",
1980
+ "git.status.read-timeout": "Git read timed out",
1981
+ "git.status.read-failed": "Git read failed",
1982
+
1868
1983
  });
1869
1984
 
1870
1985
  export { en };
@@ -127,7 +127,11 @@ const ja = Object.freeze({
127
127
  "features.index": "全文インデックス",
128
128
  "features.refreshIndex": "インデックスを更新",
129
129
  "features.indexStatus": "{count} セッションを登録、更新 {processed}/{total}",
130
- "features.indexScope": "検出済み候補のみ対象。上のソース・プロジェクト・役割の条件を使用。新規メッセージは更新後に検索できます。",
130
+ "features.indexCatalogTime": "索引カタログ更新日時(UTC):{time}",
131
+ "features.indexSourceCoverage": "{source}:候補 {count} 件を検出;検出上限 {limit}",
132
+ "features.indexUnknown": "不明",
133
+ "features.indexCoverageUnknown": "現在のソースに対象範囲の記録がありません。索引を更新してください。",
134
+ "features.indexScope": "検索対象は索引済みの候補のみで、全履歴や最新メッセージではありません。カタログ日時は各ソースの同期日時ではありません。上のソース、プロジェクト、ロールの絞り込みを使用します。新しいメッセージには索引更新が必要です。",
131
135
  "features.indexFailures": "{count} 件の読み込み失敗。該当記録は対象外です",
132
136
  "features.coverage": "登録済みセッション {scanned}/{total} 件を検索",
133
137
  "features.partial": "対象範囲は一部のみ。最大 100 件を表示",
@@ -1136,6 +1140,21 @@ const ja = Object.freeze({
1136
1140
  'sessions.roleLabel.assistant': 'Assistant',
1137
1141
 
1138
1142
  // Usage panel
1143
+ "usage.records.title": "使用量記録の内訳",
1144
+ "usage.records.scope": "記録は UTC 日付で集計します。Codex は累積値の差分、Claude/Pi はアシスタント使用量、Gemini は対応済み JSON セッションの tokens を使います。Gemini の合計には思考とツールの Token が含まれ、キャッシュ読み取りは入力の一部です。未記録項目は不明のままです。既存グラフはセッション更新日を使います。全文推定は別集計で、料金ではありません。",
1145
+ "usage.records.coverage": "候補 {candidates} 件中 {scanned} 件を走査。使用量記録なし {unreported} 件、記録形式未対応 {unsupported} 件。",
1146
+ "usage.records.failed": "{count} 件の読み込みに失敗。結果は不完全です。更新して再試行してください。",
1147
+ "usage.records.total": "記録トークン",
1148
+ "usage.records.estimated": "全文推定トークン",
1149
+ "usage.records.cacheRead": "キャッシュ読み取り",
1150
+ "usage.records.cacheWrite": "キャッシュ書き込み",
1151
+ "usage.records.unknown": "不明",
1152
+ "usage.records.date": "日付 (UTC)",
1153
+ "usage.records.source": "ソース",
1154
+ "usage.records.model": "モデル",
1155
+ "usage.records.input": "入力",
1156
+ "usage.records.output": "出力",
1157
+ "usage.records.undated": "記録時刻のないトークン: {tokens}。特定の日付には割り当てません。",
1139
1158
  'usage.overview': 'Usage 概要',
1140
1159
  'usage.range.aria': 'Usage 時間範囲',
1141
1160
  'usage.range.7d': '直近 7 日',
@@ -1866,6 +1885,102 @@ const ja = Object.freeze({
1866
1885
  'sysPrompt.hint.unsaved': '未保存の変更があります',
1867
1886
  'sysPrompt.hint.twoStepSave': 'プレビューで差分を確認し、確認後に保存します。',
1868
1887
  'sysPrompt.toast.saved': 'System prompt を保存しました',
1888
+ "evidence.title": "セッション横断の証拠パック",
1889
+ "evidence.select": "証拠パックに追加",
1890
+ "evidence.remove": "削除",
1891
+ "evidence.goal": "引き継ぎ目標",
1892
+ "evidence.generate": "証拠パックを生成",
1893
+ "evidence.preview": "プレビュー({count} 文字)",
1894
+ "evidence.download": "Markdown をダウンロード",
1895
+ "evidence.memory": "選択はこのページ内のみ保持。再読み込みでクリアされ、元の記録は変更しません。",
1896
+ "evidence.scope": "選択した過去の資料のみ。未送信で、現在のバージョンは未検証です。",
1897
+ "evidence.path": "原文パス",
1898
+ "evidence.status": "過去の証拠状態",
1899
+ "evidence.passed": "過去のツールログは成功を示す。現在のバージョンは未検証",
1900
+ "evidence.failed": "過去のツールログは失敗を示す",
1901
+ "evidence.unverified": "要確認",
1902
+ "evidence.changed": "原文が変更されました。インデックスを更新して再選択してください。",
1903
+ "evidence.limit": "最大 100 件を選択できます。",
1904
+ "artifacts.format": "出力形式",
1905
+ "artifacts.receipt": "開発レシート",
1906
+ "artifacts.relay": "マルチ Agent 引き継ぎパック",
1907
+ "artifacts.generate.receipt": "開発レシートを生成",
1908
+ "artifacts.generate.relay": "引き継ぎパックを生成",
1909
+ "artifacts.scope": "選択した過去の資料のみからローカルで生成。未送信・未実行で、現在のバージョンは未検収です。",
1910
+ "artifacts.goal": "目標(ユーザー入力)",
1911
+ "artifacts.note": "補足(ユーザー入力、任意)",
1912
+ "artifacts.notePlaceholder": "変更理由、次の手順、検収基準を入力。補足は検証の証拠ではありません。",
1913
+ "artifacts.unspecified": "未入力。手動で補足してください。",
1914
+ "artifacts.checks": "過去のチェック記録",
1915
+ "artifacts.noVerdict": "記録数はタスク完了や現在のバージョンのテスト成功を示しません。原文の抜粋は以下にあります。",
1916
+ "artifacts.sources": "選択した資料と出典",
1917
+ "artifacts.executor": "第1段階:実行者",
1918
+ "artifacts.executorTask": "目標、原文、許可された変更範囲を確認。明示的な許可のみで実行し、目標が不明または資料が無効なら停止。実際の変更、チェック、失敗、未検証項目を報告。過去のコマンドを再実行しないでください。",
1919
+ "artifacts.reviewer": "第2段階:レビュー担当",
1920
+ "artifacts.reviewerTask": "実行結果、原文、現在のバージョンを読み取り専用で確認。事実、推論、証拠不足を区別。送信済みや自己申告の既読を完了と扱わず、残る手動検収手順を列挙してください。",
1921
+ "artifacts.uat": "手動 UAT:未実行・未検収",
1922
+ "artifacts.uatTask": "対象バージョンの実際の入口から目標を再確認。観察結果と失敗基準を記録。過去のログ、引き継ぎ、自己申告の既読は現在の検収の代わりになりません。",
1923
+
1924
+ "collections.title": "証拠コレクション",
1925
+ "collections.scope": "明示的に保存した名前、目標、原文参照のみを保持します。開くと一時選択を置き換えます。再読み込み後は手動で開いてください。元のセッションはバックアップしません。",
1926
+ "collections.name": "コレクション名",
1927
+ "collections.save": "コレクションを保存",
1928
+ "collections.saveAs": "別名で保存",
1929
+ "collections.remove": "コレクションを削除",
1930
+ "collections.refresh": "コレクションを更新",
1931
+ "collections.empty": "保存済みコレクションはありません",
1932
+ "collections.state.ready": "原文と一致",
1933
+ "collections.state.changed": "原文が変更済み",
1934
+ "collections.state.unavailable": "原文を読み取れません",
1935
+ "stories.title": "開発ストーリー",
1936
+ "stories.scope": "ユーザーによる明示的な関連付けは、作成元やテスト成功の証明ではありません。ローカルのメタデータのみ保存し、Git への書き込みや送信は行いません。",
1937
+ "stories.linked": "ユーザーによる関連付け",
1938
+ "stories.unavailable": "セッションは現在の検出候補にありません",
1939
+ "stories.session": "関連セッション",
1940
+ "stories.choose": "現在のプロジェクトのセッションを選択",
1941
+ "stories.note": "変更理由",
1942
+ "stories.save": "関連付けを保存",
1943
+ "stories.remove": "関連付けを解除",
1944
+ "stories.refresh": "関連付けを更新",
1945
+ "features.error.collection-input-invalid": "名前、目標、選択した参照を確認してください",
1946
+ "features.error.collection-not-found": "コレクションは削除済みです。一覧を更新してください",
1947
+ "features.error.collection-source-unavailable": "原文が変更済みか読み取り不能です。インデックスを更新して再選択してください",
1948
+ "features.error.story-input-invalid": "プロジェクト、完全なコミット SHA、メモを確認してください",
1949
+ "features.error.story-project-unavailable": "プロジェクトは現在の検出範囲外です",
1950
+ "features.error.story-session-unavailable": "セッションは現在のプロジェクト候補にありません",
1951
+ "features.error.story-not-found": "関連付けは削除済みです。一覧を更新してください",
1952
+ "features.error.project-git-commit-invalid": "コミットは現在のプロジェクトの最新 30 件にありません",
1953
+
1954
+ "pricing.title": "料金参考(USD)",
1955
+ "pricing.scope": "内蔵価格の基本テキスト単価による推定で、請求額ではありません。段階料金、サービス層、キャッシュ期間、ツール、マルチモーダル追加料金を除外し、過去の課金先は推定しません。",
1956
+ "pricing.total": "参考合計",
1957
+ "pricing.subtotal": "既知行の小計",
1958
+ "pricing.coverage": "価格あり {known} 行、不明 {unknown} 行、読取失敗 {failed}、未報告 {unreported}、未対応 {unsupported}",
1959
+ "pricing.basis": "根拠",
1960
+ "pricing.rates": "百万 Token 当たり:入力 {input} / 出力 {output} / キャッシュ読取 {cached} / 書込 {created}",
1961
+ "pricing.download": "料金参考 JSON をダウンロード",
1962
+ "pricing.reason.base-rate": "基本単価の推定",
1963
+ "pricing.reason.model-unknown": "モデル価格不明",
1964
+ "pricing.reason.usage-incomplete": "Token 内訳が不完全",
1965
+ "pricing.reason.usage-unclassified": "未分類 Token あり",
1966
+ "pricing.reason.rate-missing": "項目単価なし",
1967
+
1968
+ "git.title": "Git 変更との関連(読み取り専用)",
1969
+ "git.scope": "現在のプロジェクトのみ参照。セッション更新時刻の前後 24 時間のコミット候補で、因果関係やテスト成功の証明ではありません。Git 書込や会話のアップロードは行いません。",
1970
+ "git.detached": "切り離された HEAD",
1971
+ "git.noHead": "コミットなし",
1972
+ "git.changes": "変更ファイル {count} 件",
1973
+ "git.truncated": "最大 30 コミット、50 変更ファイル。リストは省略されています。",
1974
+ "git.candidate": "時刻による関連候補",
1975
+ "git.refresh": "Git を再読込",
1976
+ "git.status.ready": "現在の Git 状態を読込済み",
1977
+ "git.status.unborn": "まだコミットがありません",
1978
+ "git.status.not-repository": "Git リポジトリではありません",
1979
+ "git.status.path-unavailable": "プロジェクトパスにアクセスできません",
1980
+ "git.status.git-unavailable": "Git が見つかりません",
1981
+ "git.status.read-timeout": "Git 読込がタイムアウトしました",
1982
+ "git.status.read-failed": "Git 読込に失敗しました",
1983
+
1869
1984
  });
1870
1985
 
1871
1986
  export { ja };
@@ -127,7 +127,11 @@ const vi = Object.freeze({
127
127
  "features.index": "Chỉ mục toàn văn",
128
128
  "features.refreshIndex": "Cập nhật chỉ mục",
129
129
  "features.indexStatus": "Đã lập chỉ mục {count} phiên; cập nhật {processed}/{total}",
130
- "features.indexScope": "Chỉ bao gồm các phiên đã phát hiện. Dùng bộ lọc nguồn, dự án và vai trò phía trên. Cập nhật để tìm tin nhắn mới.",
130
+ "features.indexCatalogTime": "Danh mục chỉ mục cập nhật (UTC): {time}",
131
+ "features.indexSourceCoverage": "{source}: đã phát hiện {count} phiên ứng viên; giới hạn phát hiện {limit}",
132
+ "features.indexUnknown": "Không rõ",
133
+ "features.indexCoverageUnknown": "Chưa có bản ghi phạm vi cho nguồn hiện tại. Hãy cập nhật chỉ mục.",
134
+ "features.indexScope": "Chỉ tìm trong các phiên ứng viên đã lập chỉ mục, không phải toàn bộ lịch sử hoặc tin nhắn mới. Thời gian danh mục không phải thời gian đồng bộ từng nguồn. Dùng bộ lọc nguồn, dự án và vai trò ở trên. Cập nhật chỉ mục để tìm tin nhắn mới.",
131
135
  "features.indexFailures": "Không đọc được {count} mục; kết quả không bao gồm các mục này",
132
136
  "features.coverage": "Đã tìm {scanned}/{total} phiên được lập chỉ mục",
133
137
  "features.partial": "Kết quả chưa bao phủ toàn bộ phạm vi; hiển thị tối đa 100 kết quả",
@@ -1312,6 +1316,21 @@ const vi = Object.freeze({
1312
1316
  'sessions.roleLabel.user': 'Người dùng',
1313
1317
  'sessions.roleLabel.system': 'Hệ thống',
1314
1318
  'sessions.roleLabel.assistant': 'Trợ lý',
1319
+ "usage.records.title": "Chi tiết bản ghi sử dụng",
1320
+ "usage.records.scope": "Bản ghi dùng ngày UTC: chênh lệch bộ đếm Codex, dữ liệu trợ lý Claude/Pi và tokens từ phiên Gemini JSON được hỗ trợ. Tổng Gemini gồm token suy luận và công cụ; token đọc bộ nhớ đệm thuộc tập con đầu vào. Trường thiếu giữ trạng thái không rõ. Biểu đồ cũ dùng ngày cập nhật phiên. Ước tính toàn văn được tách riêng, không phải chi phí.",
1321
+ "usage.records.coverage": "Đã quét {scanned}/{candidates} phiên; {unreported} không có bản ghi sử dụng, {unsupported} nguồn bản ghi chưa hỗ trợ.",
1322
+ "usage.records.failed": "Không đọc được {count} phiên. Kết quả chưa đầy đủ; làm mới để thử lại.",
1323
+ "usage.records.total": "Token ghi nhận",
1324
+ "usage.records.estimated": "Token ước tính toàn văn",
1325
+ "usage.records.cacheRead": "Đọc bộ nhớ đệm",
1326
+ "usage.records.cacheWrite": "Ghi bộ nhớ đệm",
1327
+ "usage.records.unknown": "Không rõ",
1328
+ "usage.records.date": "Ngày (UTC)",
1329
+ "usage.records.source": "Nguồn",
1330
+ "usage.records.model": "Mô hình",
1331
+ "usage.records.input": "Đầu vào",
1332
+ "usage.records.output": "Đầu ra",
1333
+ "usage.records.undated": "Token thiếu thời gian bản ghi: {tokens}; không gán vào ngày cụ thể.",
1315
1334
  'usage.overview': 'Tổng quan thống kê',
1316
1335
  'usage.range.aria': 'Phạm vi thời gian thống kê',
1317
1336
  'usage.range.7d': '7 ngày qua',
@@ -1834,6 +1853,102 @@ const vi = Object.freeze({
1834
1853
  'sysPrompt.hint.unsaved': 'Có thay đổi chưa lưu',
1835
1854
  'sysPrompt.hint.twoStepSave': 'Nhấn xem trước để xem diff, sau đó xác nhận để lưu.',
1836
1855
  'sysPrompt.toast.saved': 'Đã lưu system prompt',
1856
+ "evidence.title": "Gói bằng chứng liên phiên",
1857
+ "evidence.select": "Thêm vào gói bằng chứng",
1858
+ "evidence.remove": "Bỏ chọn",
1859
+ "evidence.goal": "Mục tiêu bàn giao",
1860
+ "evidence.generate": "Tạo gói bằng chứng",
1861
+ "evidence.preview": "Xem trước ({count} ký tự)",
1862
+ "evidence.download": "Tải Markdown",
1863
+ "evidence.memory": "Lựa chọn chỉ lưu trong trang; tải lại sẽ xóa lựa chọn, không đổi bản gốc.",
1864
+ "evidence.scope": "Chỉ trích xuất tài liệu lịch sử đã chọn; chưa gửi, chưa kiểm chứng phiên bản hiện tại.",
1865
+ "evidence.path": "Đường dẫn nguồn",
1866
+ "evidence.status": "Trạng thái bằng chứng lịch sử",
1867
+ "evidence.passed": "Nhật ký công cụ cũ báo thành công; phiên bản hiện tại chưa kiểm chứng",
1868
+ "evidence.failed": "Nhật ký công cụ cũ báo thất bại",
1869
+ "evidence.unverified": "Cần kiểm tra",
1870
+ "evidence.changed": "Nguồn đã đổi; cập nhật chỉ mục rồi chọn lại.",
1871
+ "evidence.limit": "Chọn tối đa 100 mục.",
1872
+ "artifacts.format": "Định dạng đầu ra",
1873
+ "artifacts.receipt": "Phiếu phát triển",
1874
+ "artifacts.relay": "Gói tiếp sức đa Agent",
1875
+ "artifacts.generate.receipt": "Tạo phiếu phát triển",
1876
+ "artifacts.generate.relay": "Tạo gói tiếp sức",
1877
+ "artifacts.scope": "Chỉ tạo cục bộ từ tài liệu lịch sử đã chọn. Chưa gửi, chưa thực thi; phiên bản hiện tại chưa nghiệm thu.",
1878
+ "artifacts.goal": "Mục tiêu (người dùng nhập)",
1879
+ "artifacts.note": "Ghi chú thêm (người dùng nhập, tùy chọn)",
1880
+ "artifacts.notePlaceholder": "Nhập lý do thay đổi, bước tiếp theo hoặc tiêu chí nghiệm thu; ghi chú không phải bằng chứng kiểm chứng.",
1881
+ "artifacts.unspecified": "Chưa nhập; cần bổ sung thủ công.",
1882
+ "artifacts.checks": "Tổng hợp kiểm tra lịch sử",
1883
+ "artifacts.noVerdict": "Số bản ghi không chứng minh nhiệm vụ hoàn tất hay phiên bản hiện tại vượt qua kiểm tra. Trích nguồn ở bên dưới.",
1884
+ "artifacts.sources": "Tài liệu đã chọn và nguồn",
1885
+ "artifacts.executor": "Chặng 1: Người thực hiện",
1886
+ "artifacts.executorTask": "Kiểm tra mục tiêu, nguồn gốc và phạm vi được phép sửa. Chỉ thực hiện khi được cho phép rõ ràng; dừng nếu mục tiêu chưa rõ hoặc nguồn không hợp lệ. Báo cáo thay đổi thực tế, kiểm tra, lỗi và mục chưa xác minh. Không chạy lại lệnh lịch sử.",
1887
+ "artifacts.reviewer": "Chặng 2: Người rà soát",
1888
+ "artifacts.reviewerTask": "Chỉ đọc để rà soát kết quả, nguồn gốc và phiên bản hiện tại. Phân biệt sự thật, suy luận và thiếu bằng chứng. Đã gửi hoặc tự báo đã đọc không có nghĩa là hoàn tất. Liệt kê bước nghiệm thu thủ công còn lại.",
1889
+ "artifacts.uat": "UAT thủ công: chưa thực hiện, chưa nghiệm thu",
1890
+ "artifacts.uatTask": "Kiểm tra lại mục tiêu qua điểm vào thực tế trên phiên bản cần nghiệm thu. Ghi kết quả quan sát và tiêu chí thất bại. Nhật ký lịch sử, bàn giao hay tự báo đã đọc không thay thế nghiệm thu hiện tại.",
1891
+
1892
+ "collections.title": "Bộ sưu tập bằng chứng",
1893
+ "collections.scope": "Chỉ lưu tên, mục tiêu và tham chiếu nguồn khi chọn lưu. Mở sẽ thay giỏ tạm; tải lại cần mở thủ công. Không sao lưu phiên gốc.",
1894
+ "collections.name": "Tên bộ sưu tập",
1895
+ "collections.save": "Lưu bộ sưu tập",
1896
+ "collections.saveAs": "Lưu bản mới",
1897
+ "collections.remove": "Xóa bộ sưu tập",
1898
+ "collections.refresh": "Làm mới bộ sưu tập",
1899
+ "collections.empty": "Chưa có bộ sưu tập đã lưu",
1900
+ "collections.state.ready": "Nguồn khớp",
1901
+ "collections.state.changed": "Nguồn đã đổi",
1902
+ "collections.state.unavailable": "Không đọc được nguồn",
1903
+ "stories.title": "Câu chuyện phát triển",
1904
+ "stories.scope": "Liên kết do người dùng chọn không chứng minh phiên tạo commit hay kiểm thử đạt. Chỉ lưu siêu dữ liệu cục bộ; không ghi Git hoặc tải lên.",
1905
+ "stories.linked": "Người dùng liên kết",
1906
+ "stories.unavailable": "Phiên không nằm trong ứng viên hiện được phát hiện",
1907
+ "stories.session": "Phiên liên kết",
1908
+ "stories.choose": "Chọn phiên của dự án hiện tại",
1909
+ "stories.note": "Lý do thay đổi",
1910
+ "stories.save": "Lưu liên kết",
1911
+ "stories.remove": "Xóa liên kết",
1912
+ "stories.refresh": "Làm mới liên kết",
1913
+ "features.error.collection-input-invalid": "Kiểm tra tên, mục tiêu và tham chiếu đã chọn",
1914
+ "features.error.collection-not-found": "Bộ sưu tập đã bị xóa; làm mới danh sách",
1915
+ "features.error.collection-source-unavailable": "Nguồn đã đổi hoặc không đọc được; cập nhật chỉ mục rồi chọn lại",
1916
+ "features.error.story-input-invalid": "Kiểm tra dự án, SHA commit đầy đủ và ghi chú",
1917
+ "features.error.story-project-unavailable": "Dự án nằm ngoài phạm vi phát hiện hiện tại",
1918
+ "features.error.story-session-unavailable": "Phiên không nằm trong ứng viên của dự án hiện tại",
1919
+ "features.error.story-not-found": "Liên kết đã bị xóa; làm mới danh sách",
1920
+ "features.error.project-git-commit-invalid": "Commit không nằm trong 30 commit mới nhất của dự án hiện tại",
1921
+
1922
+ "pricing.title": "Chi phí tham khảo (USD)",
1923
+ "pricing.scope": "Ước tính theo giá token văn bản cơ bản tích hợp, không phải hóa đơn. Không tính bậc giá, tầng dịch vụ, thời hạn bộ nhớ đệm, công cụ hoặc đa phương thức; không suy đoán nhà cung cấp thanh toán lịch sử.",
1924
+ "pricing.total": "Tổng tham khảo",
1925
+ "pricing.subtotal": "Tổng các dòng đã biết",
1926
+ "pricing.coverage": "Có giá {known}; chưa rõ {unknown}; lỗi {failed}; chưa báo cáo {unreported}; chưa hỗ trợ {unsupported}",
1927
+ "pricing.basis": "Cơ sở",
1928
+ "pricing.rates": "Mỗi triệu token: đầu vào {input} / đầu ra {output} / đọc đệm {cached} / ghi đệm {created}",
1929
+ "pricing.download": "Tải JSON giá tham khảo",
1930
+ "pricing.reason.base-rate": "Ước tính giá cơ bản",
1931
+ "pricing.reason.model-unknown": "Chưa rõ giá mô hình",
1932
+ "pricing.reason.usage-incomplete": "Thiếu phân loại token",
1933
+ "pricing.reason.usage-unclassified": "Token chưa phân loại",
1934
+ "pricing.reason.rate-missing": "Thiếu đơn giá thành phần",
1935
+
1936
+ "git.title": "Liên kết thay đổi Git (chỉ đọc)",
1937
+ "git.scope": "Chỉ xem kho dự án hiện tại. Ứng viên là commit trong 24 giờ quanh thời điểm cập nhật phiên, không chứng minh nguyên nhân hay kiểm thử đạt. Không ghi Git hoặc tải phiên lên.",
1938
+ "git.detached": "HEAD tách rời",
1939
+ "git.noHead": "Chưa có commit",
1940
+ "git.changes": "{count} tệp đã đổi",
1941
+ "git.truncated": "Tối đa 30 commit và 50 tệp thay đổi; danh sách đã cắt bớt.",
1942
+ "git.candidate": "Ứng viên theo thời gian",
1943
+ "git.refresh": "Làm mới Git",
1944
+ "git.status.ready": "Đã đọc trạng thái Git hiện tại",
1945
+ "git.status.unborn": "Kho chưa có commit",
1946
+ "git.status.not-repository": "Không phải kho Git",
1947
+ "git.status.path-unavailable": "Không truy cập được đường dẫn dự án",
1948
+ "git.status.git-unavailable": "Không tìm thấy Git",
1949
+ "git.status.read-timeout": "Đọc Git hết thời gian",
1950
+ "git.status.read-failed": "Đọc Git thất bại",
1951
+
1837
1952
  });
1838
1953
 
1839
1954
  export { vi };