@fbincon/claude-code-statusline 3.3.0 → 3.5.0
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 +78 -73
- package/candidate.json +291 -215
- package/node_modules/@fbincon/statusline-cli/dist/src/config/operations.js +5 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/operations.js.map +1 -1
- package/node_modules/@fbincon/statusline-cli/dist/src/config/profile-command.d.ts +12 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/profile-command.js +101 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/profile-command.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/profiles.d.ts +54 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/profiles.js +199 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/profiles.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/service.d.ts +2 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/service.js +19 -1
- package/node_modules/@fbincon/statusline-cli/dist/src/config/service.js.map +1 -1
- package/node_modules/@fbincon/statusline-cli/dist/src/config/transfer.d.ts +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/transfer.js +4 -1
- package/node_modules/@fbincon/statusline-cli/dist/src/config/transfer.js.map +1 -1
- package/node_modules/@fbincon/statusline-cli/dist/src/diagnostics/command.js +9 -2
- package/node_modules/@fbincon/statusline-cli/dist/src/diagnostics/command.js.map +1 -1
- package/node_modules/@fbincon/statusline-cli/dist/src/diagnostics/service.d.ts +8 -2
- package/node_modules/@fbincon/statusline-cli/dist/src/diagnostics/service.js +6 -3
- package/node_modules/@fbincon/statusline-cli/dist/src/diagnostics/service.js.map +1 -1
- package/node_modules/@fbincon/statusline-cli/dist/src/help.js +14 -2
- package/node_modules/@fbincon/statusline-cli/dist/src/help.js.map +1 -1
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/arguments.js +1 -1
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/arguments.js.map +1 -1
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/configure.d.ts +2 -1
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/configure.js +3 -1
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/configure.js.map +1 -1
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/install.js +6 -1
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/install.js.map +1 -1
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/model.d.ts +2 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/setup-service.d.ts +23 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/setup-service.js +168 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/setup-service.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/setup.d.ts +3 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/setup.js +64 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/setup.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/main.js +35 -9
- package/node_modules/@fbincon/statusline-cli/dist/src/main.js.map +1 -1
- package/node_modules/@fbincon/statusline-cli/dist/src/recovery/journal.js +1 -1
- package/node_modules/@fbincon/statusline-cli/dist/src/recovery/journal.js.map +1 -1
- package/node_modules/@fbincon/statusline-cli/dist/src/rendering/configuration.d.ts +12 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/rendering/configuration.js +59 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/rendering/configuration.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/rendering/main.js +15 -2
- package/node_modules/@fbincon/statusline-cli/dist/src/rendering/main.js.map +1 -1
- package/node_modules/@fbincon/statusline-cli/dist/src/tasks/command.d.ts +3 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/tasks/command.js +25 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/tasks/command.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/tasks/service.d.ts +4 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/tasks/service.js +93 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/tasks/service.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/ui/protocol.d.ts +5 -3
- package/node_modules/@fbincon/statusline-cli/dist/src/ui/protocol.js +34 -8
- package/node_modules/@fbincon/statusline-cli/dist/src/ui/protocol.js.map +1 -1
- package/node_modules/@fbincon/statusline-cli/resources/statusline-config/SKILL.md +5 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/.claude-plugin/plugin.json +1 -1
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/hooks/register.ts +89 -3
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/backend.ts +61 -7
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/client/keys.ts +8 -1
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/client/settings.ts +1 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/draft.ts +2 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/profile-manager.ts +258 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/quick-setup.ts +14 -11
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/setup.ts +60 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/task-detail.ts +27 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/generated-contracts.ts +552 -6
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/i18n/generated-locales.ts +1194 -6
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/session.ts +2 -1
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/resource-manifest.json +18 -15
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/client/draw.ts +7 -3
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/client/help.ts +1 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/.claude-plugin/plugin.json +1 -1
- package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/resource-manifest.json +3 -3
- package/node_modules/@fbincon/statusline-core/dist/src/config/defaults.d.ts +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/defaults.js +5 -2
- package/node_modules/@fbincon/statusline-core/dist/src/config/defaults.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/config/display.d.ts +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/config/display.js +12 -10
- package/node_modules/@fbincon/statusline-core/dist/src/config/display.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/config/formatting.d.ts +3 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/formatting.js +11 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/formatting.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/config/presets.d.ts +4 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/presets.js +37 -3
- package/node_modules/@fbincon/statusline-core/dist/src/config/presets.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/config/profiles.d.ts +16 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/profiles.js +69 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/profiles.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/contracts/generated-catalog.d.ts +24 -0
- package/node_modules/@fbincon/statusline-core/dist/src/contracts/generated-catalog.js +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/contracts/generated-catalog.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/contracts/ui.d.ts +212 -4
- package/node_modules/@fbincon/statusline-core/dist/src/contracts/ui.js +485 -2
- package/node_modules/@fbincon/statusline-core/dist/src/contracts/ui.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/editor/backend.js +78 -7
- package/node_modules/@fbincon/statusline-core/dist/src/editor/backend.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/editor/draft.d.ts +2 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/draft.js +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/draft.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/editor/profile-manager.d.ts +63 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/profile-manager.js +355 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/profile-manager.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/quick-setup.d.ts +4 -4
- package/node_modules/@fbincon/statusline-core/dist/src/editor/quick-setup.js +16 -9
- package/node_modules/@fbincon/statusline-core/dist/src/editor/quick-setup.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/editor/setup.d.ts +30 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/setup.js +96 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/setup.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/task-detail.d.ts +4 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/task-detail.js +25 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/task-detail.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/generated-locales.d.ts +1188 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/generated-locales.js +1194 -6
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/generated-locales.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/release.d.ts +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/release.js +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/appearance.d.ts +3 -1
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/appearance.js +24 -2
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/appearance.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/components.d.ts +3 -1
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/components.js +18 -5
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/components.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/items.js +4 -4
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/items.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/powerline.d.ts +15 -5
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/powerline.js +78 -48
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/powerline.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/preferences.js +6 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/preferences.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/subagents.js +3 -3
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/subagents.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/details.d.ts +24 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/details.js +153 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/details.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/resources/i18n/locales/en.json +199 -1
- package/node_modules/@fbincon/statusline-core/resources/i18n/locales/ja.json +199 -1
- package/node_modules/@fbincon/statusline-core/resources/i18n/locales/ko.json +199 -1
- package/node_modules/@fbincon/statusline-core/resources/i18n/locales/zh-CN.json +199 -1
- package/node_modules/@fbincon/statusline-core/resources/i18n/locales/zh-HK.json +199 -1
- package/node_modules/@fbincon/statusline-core/resources/i18n/locales/zh-TW.json +199 -1
- package/node_modules/@fbincon/statusline-platform/dist/src/project-paths.d.ts +8 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/project-paths.js +41 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/project-paths.js.map +1 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/drawing/pages.js +6 -1
- package/node_modules/@fbincon/statusline-tui/dist/src/drawing/pages.js.map +1 -1
- package/node_modules/@fbincon/statusline-tui/dist/src/drawing/presentation.js +2 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/drawing/presentation.js.map +1 -1
- package/node_modules/@fbincon/statusline-tui/dist/src/drawing/shortcuts.js +2 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/drawing/shortcuts.js.map +1 -1
- package/node_modules/@fbincon/statusline-tui/dist/src/drawing.js +3 -2
- package/node_modules/@fbincon/statusline-tui/dist/src/drawing.js.map +1 -1
- package/node_modules/@fbincon/statusline-tui/dist/src/session.js +7 -3
- package/node_modules/@fbincon/statusline-tui/dist/src/session.js.map +1 -1
- package/node_modules/@fbincon/statusline-tui/dist/src/setup.d.ts +12 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/setup.js +75 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/setup.js.map +1 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/state.d.ts +1 -1
- package/node_modules/@fbincon/statusline-tui/dist/src/state.js +18 -2
- package/node_modules/@fbincon/statusline-tui/dist/src/state.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { LANGUAGES } from '../i18n/messages.js';
|
|
2
|
+
import { copyDraft } from './draft.js';
|
|
3
|
+
import { openQuick, quickKey, receivePreset } from './quick-setup.js';
|
|
4
|
+
/** The wizard holds only drafts; effects are executed by its CLI/TUI adapters. */
|
|
5
|
+
export class SetupState {
|
|
6
|
+
facts;
|
|
7
|
+
language;
|
|
8
|
+
phase = 'checks';
|
|
9
|
+
selected = 0;
|
|
10
|
+
scroll = 0;
|
|
11
|
+
quick = null;
|
|
12
|
+
candidate;
|
|
13
|
+
message = null;
|
|
14
|
+
constructor(facts, language) {
|
|
15
|
+
this.facts = facts;
|
|
16
|
+
this.language = language;
|
|
17
|
+
this.candidate = facts.draft ? copyDraft(facts.draft) : null;
|
|
18
|
+
}
|
|
19
|
+
receive(draft) { receivePreset(this.quick, draft); }
|
|
20
|
+
key(key) {
|
|
21
|
+
if (key === 'interrupt')
|
|
22
|
+
return 'interrupt';
|
|
23
|
+
if (key === 'escape' || key === 'cancel')
|
|
24
|
+
return 'cancel';
|
|
25
|
+
if (key === 'l') {
|
|
26
|
+
this.language = LANGUAGES[(LANGUAGES.indexOf(this.language) + 1) % LANGUAGES.length];
|
|
27
|
+
return 'language';
|
|
28
|
+
}
|
|
29
|
+
if (this.phase === 'quick') {
|
|
30
|
+
if (key === 'backspace' && this.quick.step === 'scenario') {
|
|
31
|
+
this.phase = 'choice';
|
|
32
|
+
this.selected = 1;
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
const result = quickKey(this.quick, key);
|
|
36
|
+
if (result === 'preset')
|
|
37
|
+
return 'preset';
|
|
38
|
+
if (this.quick.step === 'review') {
|
|
39
|
+
this.candidate = copyDraft(this.quick.candidate);
|
|
40
|
+
this.phase = 'review';
|
|
41
|
+
this.selected = 0;
|
|
42
|
+
this.scroll = 0;
|
|
43
|
+
}
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
if (key === 'pageup' || key === 'pagedown') {
|
|
47
|
+
this.scroll = Math.max(0, this.scroll + (key === 'pageup' ? -1 : 1));
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
if (key === 'backspace' && this.phase !== 'checks') {
|
|
51
|
+
this.phase = this.phase === 'review' && this.quick ? 'quick' : 'checks';
|
|
52
|
+
if (this.phase === 'quick') {
|
|
53
|
+
this.quick.step = 'appearance';
|
|
54
|
+
this.quick.selected = 4;
|
|
55
|
+
}
|
|
56
|
+
this.scroll = 0;
|
|
57
|
+
this.selected = 0;
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
const count = this.phase === 'checks' ? 1 : this.phase === 'choice' ? 2 : 3;
|
|
61
|
+
if (['up', 'down', 'home', 'end'].includes(key)) {
|
|
62
|
+
this.selected = key === 'home' ? 0 : key === 'end' ? count - 1 : Math.max(0, Math.min(count - 1, this.selected + (key === 'up' ? -1 : 1)));
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
if (key !== 'return')
|
|
66
|
+
return null;
|
|
67
|
+
if (this.phase === 'checks') {
|
|
68
|
+
if (this.facts.canSave) {
|
|
69
|
+
this.phase = 'choice';
|
|
70
|
+
this.selected = this.facts.hasDisplay ? 0 : 1;
|
|
71
|
+
this.scroll = 0;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
else if (this.phase === 'choice') {
|
|
75
|
+
this.scroll = 0;
|
|
76
|
+
if (this.selected === 0) {
|
|
77
|
+
this.candidate = copyDraft(this.facts.draft);
|
|
78
|
+
this.quick = null;
|
|
79
|
+
this.phase = 'review';
|
|
80
|
+
this.selected = 0;
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
this.quick = openQuick(this.facts.draft, 'daily-development');
|
|
84
|
+
this.phase = 'quick';
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
else if (this.selected === 2)
|
|
88
|
+
return 'cancel';
|
|
89
|
+
else if (this.selected === 1 && this.facts.canSave)
|
|
90
|
+
return 'save';
|
|
91
|
+
else if (this.selected === 0 && this.facts.canIntegrate)
|
|
92
|
+
return 'integrate';
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=setup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../../../src/editor/setup.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAqC,MAAM,qBAAqB,CAAC;AACnF,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAmB,MAAM,kBAAkB,CAAC;AAYvF,kFAAkF;AAClF,MAAM,OAAO,UAAU;IAOE;IAA0B;IAN/C,KAAK,GAA6C,QAAQ,CAAC;IAC3D,QAAQ,GAAG,CAAC,CAAC;IACb,MAAM,GAAG,CAAC,CAAC;IACX,KAAK,GAAsB,IAAI,CAAC;IAChC,SAAS,CAAe;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AC;gBAAC,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC;gBAAC,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;YAAC,CAAC;iBACnI,CAAC;gBAAC,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,KAAM,EAAE,mBAAmB,CAAC,CAAC;gBAAC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC;YAAC,CAAC;QAClG,CAAC;aAAM,IAAI,IAAI,CAAC,QAAQ,KAAK,CAAC;YAAE,OAAO,QAAQ,CAAC;aAC3C,IAAI,IAAI,CAAC,QAAQ,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO;YAAE,OAAO,MAAM,CAAC;aAC7D,IAAI,IAAI,CAAC,QAAQ,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,YAAY;YAAE,OAAO,WAAW,CAAC;QAC5E,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { TaskDetails } from '../contracts/ui.js';
|
|
2
|
+
import { type Language } from '../i18n/messages.js';
|
|
3
|
+
/** Both native and CLI presentations retain every evidence source and timestamp. */
|
|
4
|
+
export declare function taskDetailLines(report: TaskDetails, language: Language, width?: number): string[];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { t } from '../i18n/messages.js';
|
|
2
|
+
import { wrapText } from './text.js';
|
|
3
|
+
/** Both native and CLI presentations retain every evidence source and timestamp. */
|
|
4
|
+
export function taskDetailLines(report, language, width = 100) {
|
|
5
|
+
const tr = (key, params = {}) => t(key, language, params);
|
|
6
|
+
const status = (value) => value === null ? tr('task.unknown') : t('task.value.' + value, language, {}, value);
|
|
7
|
+
const duration = (value) => value === null ? tr('task.unknown') : value.toFixed(1) + 's';
|
|
8
|
+
const lines = [
|
|
9
|
+
tr('task.session', { value: report.session_id }), tr('task.prompt', { value: report.prompt_id ?? tr('task.unknown') }),
|
|
10
|
+
tr('task.captured', { value: report.captured_at }),
|
|
11
|
+
tr('task.status', { value: status(report.status), phase: status(report.phase) }),
|
|
12
|
+
tr('task.elapsed', { value: duration(report.elapsed_seconds) }), tr('task.active', { value: duration(report.active_seconds) }),
|
|
13
|
+
tr('task.progress', { value: report.progress ? report.progress.completed + '/' + report.progress.total : tr('task.unknown') }),
|
|
14
|
+
tr('task.agents'),
|
|
15
|
+
...report.agents.flatMap(agent => [
|
|
16
|
+
`${agent.parent_id ? agent.parent_id + ' → ' : ''}${agent.name ?? agent.id} [${agent.id}]: ${status(agent.status)}`,
|
|
17
|
+
...agent.evidence.map(e => tr('task.evidence', { source: e.source, scope: e.scope, status: status(e.status), time: e.observed_at ?? tr('task.unknown'), freshness: status(e.freshness) })),
|
|
18
|
+
]),
|
|
19
|
+
tr('task.sources'),
|
|
20
|
+
...report.evidence.map(e => tr('task.evidence', { source: e.source, scope: e.scope, status: status(e.status), time: e.observed_at ?? tr('task.unknown'), freshness: status(e.freshness) })),
|
|
21
|
+
...report.limitations.map(reason => t('task.limit.' + reason, language, {}, reason)),
|
|
22
|
+
];
|
|
23
|
+
return wrapText(lines.map(line => line.replace(/\x1b\[[0-?]*[ -/]*[@-~]/gu, '').replace(/[\p{Cc}\p{Cs}]/gu, '')), Math.max(2, width));
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=task-detail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-detail.js","sourceRoot":"","sources":["../../../src/editor/task-detail.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAiB,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErC,oFAAoF;AACpF,MAAM,UAAU,eAAe,CAAC,MAAmB,EAAE,QAAkB,EAAE,KAAK,GAAG,GAAG;IAChF,MAAM,EAAE,GAAG,CAAC,GAAW,EAAE,SAAkC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC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