@design.estate/dees-catalog 6.2.0 → 6.4.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 +301 -67
- 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-chat/dees-harness-chat.d.ts +3 -1
- package/dist_ts_web/elements/00group-harness/dees-harness-chat/dees-harness-chat.js +24 -2
- package/dist_ts_web/elements/00group-harness/dees-harness-composer/dees-harness-composer.d.ts +6 -4
- package/dist_ts_web/elements/00group-harness/dees-harness-composer/dees-harness-composer.demo.js +7 -1
- package/dist_ts_web/elements/00group-harness/dees-harness-composer/dees-harness-composer.js +67 -6
- 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 +8 -0
- package/dist_ts_web/elements/00group-harness/toolregistry.d.ts +2 -0
- package/dist_ts_web/elements/00group-harness/toolregistry.js +1 -1
- package/package.json +1 -1
- package/readme.hints.md +2 -1
- package/readme.md +13 -6
- 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-chat/dees-harness-chat.ts +13 -0
- package/ts_web/elements/00group-harness/dees-harness-composer/dees-harness-composer.demo.ts +6 -0
- package/ts_web/elements/00group-harness/dees-harness-composer/dees-harness-composer.ts +64 -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 +10 -0
- package/ts_web/elements/00group-harness/toolregistry.ts +7 -1
|
@@ -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);
|
|
@@ -350,9 +350,19 @@ export interface IHarnessStatus {
|
|
|
350
350
|
|
|
351
351
|
// ---------------------------------------------------------------- composer
|
|
352
352
|
|
|
353
|
+
export interface IHarnessComposerOption {
|
|
354
|
+
label: string;
|
|
355
|
+
value: string;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
export interface IHarnessAccountChangeDetail {
|
|
359
|
+
account: string;
|
|
360
|
+
}
|
|
361
|
+
|
|
353
362
|
export interface IHarnessComposerSendDetail {
|
|
354
363
|
text: string;
|
|
355
364
|
attachments: IHarnessAttachment[];
|
|
365
|
+
account?: string;
|
|
356
366
|
model?: string;
|
|
357
367
|
reasoningEffort?: string;
|
|
358
368
|
}
|
|
@@ -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 */
|