@design.estate/dees-catalog 6.3.0 → 6.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/dist_bundle/bundle.js +237 -52
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/dist_ts_web/elements/00group-dataview/dees-dataview-codebox/dees-dataview-codebox.d.ts +9 -2
- package/dist_ts_web/elements/00group-dataview/dees-dataview-codebox/dees-dataview-codebox.js +133 -30
- package/dist_ts_web/elements/00group-harness/dees-harness-message-list/dees-harness-message-list.d.ts +1 -1
- package/dist_ts_web/elements/00group-harness/dees-harness-message-list/dees-harness-message-list.js +28 -4
- package/dist_ts_web/elements/00group-harness/dees-harness-tool-card/dees-harness-tool-card.d.ts +10 -0
- package/dist_ts_web/elements/00group-harness/dees-harness-tool-card/dees-harness-tool-card.js +77 -9
- package/dist_ts_web/elements/00group-harness/dees-harness-tool-card/renderers.d.ts +2 -0
- package/dist_ts_web/elements/00group-harness/dees-harness-tool-card/renderers.js +31 -4
- package/dist_ts_web/elements/00group-harness/interfaces.d.ts +7 -0
- package/dist_ts_web/elements/00group-harness/toolregistry.d.ts +2 -0
- package/dist_ts_web/elements/00group-harness/toolregistry.js +2 -2
- package/package.json +1 -1
- package/readme.hints.md +2 -1
- package/readme.md +5 -3
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/00group-dataview/dees-dataview-codebox/dees-dataview-codebox.ts +135 -31
- package/ts_web/elements/00group-harness/dees-harness-message-list/dees-harness-message-list.ts +46 -5
- package/ts_web/elements/00group-harness/dees-harness-tool-card/dees-harness-tool-card.ts +74 -7
- package/ts_web/elements/00group-harness/dees-harness-tool-card/renderers.ts +43 -4
- package/ts_web/elements/00group-harness/interfaces.ts +8 -0
- package/ts_web/elements/00group-harness/toolregistry.ts +8 -2
|
@@ -34,6 +34,8 @@ interface IApplyPatchFile {
|
|
|
34
34
|
path: string;
|
|
35
35
|
before: string;
|
|
36
36
|
after: string;
|
|
37
|
+
unifiedDiff?: string;
|
|
38
|
+
lineNumbersKnown: boolean;
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
/**
|
|
@@ -43,14 +45,27 @@ interface IApplyPatchFile {
|
|
|
43
45
|
*/
|
|
44
46
|
export const parseApplyPatch = (patchText: string): IApplyPatchFile[] => {
|
|
45
47
|
const files: IApplyPatchFile[] = [];
|
|
46
|
-
let current: {
|
|
48
|
+
let current: {
|
|
49
|
+
op: IApplyPatchFile['op'];
|
|
50
|
+
path: string;
|
|
51
|
+
before: string[];
|
|
52
|
+
after: string[];
|
|
53
|
+
patch: string[];
|
|
54
|
+
sawHunk: boolean;
|
|
55
|
+
lineNumbersKnown: boolean;
|
|
56
|
+
} | null = null;
|
|
47
57
|
const flush = (): void => {
|
|
48
58
|
if (!current) return;
|
|
59
|
+
const unifiedDiff = current.op === 'update' && current.sawHunk && current.lineNumbersKnown
|
|
60
|
+
? [`--- a/${current.path}`, `+++ b/${current.path}`, ...current.patch].join('\n')
|
|
61
|
+
: undefined;
|
|
49
62
|
files.push({
|
|
50
63
|
op: current.op,
|
|
51
64
|
path: current.path,
|
|
52
65
|
before: current.before.join('\n'),
|
|
53
66
|
after: current.after.join('\n'),
|
|
67
|
+
unifiedDiff,
|
|
68
|
+
lineNumbersKnown: Boolean(unifiedDiff),
|
|
54
69
|
});
|
|
55
70
|
current = null;
|
|
56
71
|
};
|
|
@@ -63,15 +78,31 @@ export const parseApplyPatch = (patchText: string): IApplyPatchFile[] => {
|
|
|
63
78
|
path: header[2].trim(),
|
|
64
79
|
before: [],
|
|
65
80
|
after: [],
|
|
81
|
+
patch: [],
|
|
82
|
+
sawHunk: false,
|
|
83
|
+
lineNumbersKnown: true,
|
|
66
84
|
};
|
|
67
85
|
continue;
|
|
68
86
|
}
|
|
69
|
-
if (
|
|
87
|
+
if (
|
|
88
|
+
/^\*\*\* (Begin|End) Patch/.test(line)
|
|
89
|
+
|| line === '*** End of File'
|
|
90
|
+
|| /^\*\*\* Move to: /.test(line)
|
|
91
|
+
) {
|
|
70
92
|
if (/End Patch/.test(line)) flush();
|
|
71
93
|
continue;
|
|
72
94
|
}
|
|
73
95
|
if (!current) continue;
|
|
74
|
-
if (line.startsWith('@@'))
|
|
96
|
+
if (line.startsWith('@@')) {
|
|
97
|
+
current.sawHunk = true;
|
|
98
|
+
if (/^@@ -\d+(?:,\d+)? \+\d+(?:,\d+)? @@/.test(line)) {
|
|
99
|
+
current.patch.push(line);
|
|
100
|
+
} else {
|
|
101
|
+
current.lineNumbersKnown = false;
|
|
102
|
+
}
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
current.patch.push(line);
|
|
75
106
|
if (line.startsWith('+')) {
|
|
76
107
|
current.after.push(line.slice(1));
|
|
77
108
|
} else if (line.startsWith('-')) {
|
|
@@ -154,6 +185,8 @@ const renderFileWrite = (call: IHarnessToolCall, helpers: IHarnessToolRenderHelp
|
|
|
154
185
|
language: patchLanguage,
|
|
155
186
|
filename: patchFilename,
|
|
156
187
|
view: 'split',
|
|
188
|
+
unifiedDiff: file.unifiedDiff,
|
|
189
|
+
showLineNumbers: file.lineNumbersKnown,
|
|
157
190
|
});
|
|
158
191
|
}
|
|
159
192
|
if (file.op === 'add') {
|
|
@@ -180,7 +213,13 @@ const renderFileWrite = (call: IHarnessToolCall, helpers: IHarnessToolRenderHelp
|
|
|
180
213
|
const filename = path.split('/').pop() || undefined;
|
|
181
214
|
const language = harnessLanguageForPath(path);
|
|
182
215
|
if (previousContent) {
|
|
183
|
-
|
|
216
|
+
const isStringReplacement = input.oldString !== undefined || input.old_string !== undefined;
|
|
217
|
+
return helpers.diffBlock(previousContent, newContent, {
|
|
218
|
+
language,
|
|
219
|
+
filename,
|
|
220
|
+
view: 'split',
|
|
221
|
+
showLineNumbers: !isStringReplacement,
|
|
222
|
+
});
|
|
184
223
|
}
|
|
185
224
|
if (newContent) {
|
|
186
225
|
return helpers.codeBlock(newContent, language, filename);
|
|
@@ -43,6 +43,12 @@ export interface IHarnessUsage {
|
|
|
43
43
|
cacheWriteTokens?: number;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
/** Stable source position for transcript entries derived from ordered messages and parts. */
|
|
47
|
+
export interface IHarnessTranscriptOrder {
|
|
48
|
+
messageIndex: number;
|
|
49
|
+
partIndex: number;
|
|
50
|
+
}
|
|
51
|
+
|
|
46
52
|
/** Session-level token facts. Unknown metrics stay undefined. */
|
|
47
53
|
export interface IHarnessSessionMetrics {
|
|
48
54
|
/** Cumulative token usage across the complete session. */
|
|
@@ -98,6 +104,8 @@ export interface IHarnessMessage {
|
|
|
98
104
|
text: string;
|
|
99
105
|
/** epoch ms */
|
|
100
106
|
createdAt: number;
|
|
107
|
+
/** Preferred chronology; timestamps remain display metadata when this is present. */
|
|
108
|
+
order?: IHarnessTranscriptOrder;
|
|
101
109
|
updatedAt?: number;
|
|
102
110
|
/** gates the streaming cursor and markdown parse throttling */
|
|
103
111
|
streaming?: boolean;
|
|
@@ -11,7 +11,13 @@ export interface IHarnessToolRenderHelpers {
|
|
|
11
11
|
/** highlighted code block (dees-dataview-codebox) with optional filename */
|
|
12
12
|
codeBlock(code: string, language?: string, filename?: string): TemplateResult;
|
|
13
13
|
/** before/after diff (dees-dataview-codebox diff mode) */
|
|
14
|
-
diffBlock(before: string, after: string, options?: {
|
|
14
|
+
diffBlock(before: string, after: string, options?: {
|
|
15
|
+
language?: string;
|
|
16
|
+
filename?: string;
|
|
17
|
+
view?: 'inline' | 'split';
|
|
18
|
+
unifiedDiff?: string;
|
|
19
|
+
showLineNumbers?: boolean;
|
|
20
|
+
}): TemplateResult;
|
|
15
21
|
/** plain monospace block with truncation + expand */
|
|
16
22
|
monoBlock(text: string, options?: { maxChars?: number; tone?: 'default' | 'error' }): TemplateResult;
|
|
17
23
|
/** two-column key/value summary */
|
|
@@ -76,7 +82,7 @@ const filePathOf = (call: IHarnessToolCall): string =>
|
|
|
76
82
|
const defaultDescriptors: IHarnessToolDescriptor[] = [
|
|
77
83
|
{
|
|
78
84
|
kind: 'terminal',
|
|
79
|
-
names: ['run_command', 'bash', 'shell', 'exec'],
|
|
85
|
+
names: ['run_command', 'run_shell', 'bash', 'shell', 'exec'],
|
|
80
86
|
label: 'Shell',
|
|
81
87
|
icon: 'lucide:Terminal',
|
|
82
88
|
subtitle: (call) => {
|