mu-coding 0.11.0 → 0.12.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mu-coding",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Minimal terminal AI assistant for local models",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"ink": "^7.0.1",
|
|
27
|
-
"mu-agents": "0.
|
|
28
|
-
"mu-core": "0.
|
|
29
|
-
"mu-openai-provider": "0.
|
|
27
|
+
"mu-agents": "0.12.0",
|
|
28
|
+
"mu-core": "0.12.0",
|
|
29
|
+
"mu-openai-provider": "0.12.0",
|
|
30
30
|
"react": "^19.2.5"
|
|
31
31
|
}
|
|
32
32
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Box } from 'ink';
|
|
2
|
+
import { ToolHeader } from './ToolHeader';
|
|
3
|
+
|
|
4
|
+
interface WebFetchOutputProps {
|
|
5
|
+
args: string;
|
|
6
|
+
error: boolean;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function parseUrl(args: string): string {
|
|
10
|
+
try {
|
|
11
|
+
const parsed = JSON.parse(args);
|
|
12
|
+
return typeof parsed.url === 'string' ? parsed.url : '(unknown)';
|
|
13
|
+
} catch {
|
|
14
|
+
return '(unknown)';
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Compact renderer for the `webfetch` tool — shows a one-line header with the
|
|
20
|
+
* fetched URL and elides the (often huge) response body so it doesn't fill
|
|
21
|
+
* the transcript. Mirrors `ReadOutput`'s minimal layout.
|
|
22
|
+
*/
|
|
23
|
+
export function WebFetchOutput({ args, error }: WebFetchOutputProps) {
|
|
24
|
+
const url = parseUrl(args);
|
|
25
|
+
return (
|
|
26
|
+
<Box flexDirection="column" flexShrink={0} marginBottom={0}>
|
|
27
|
+
<ToolHeader name="webfetch" subtitle={url} error={error} />
|
|
28
|
+
</Box>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
@@ -5,6 +5,7 @@ import { useTheme } from '../../context/ThemeContext';
|
|
|
5
5
|
import { useSpinner } from '../../hooks/useUI';
|
|
6
6
|
import { EditOutput } from './EditOutput';
|
|
7
7
|
import { ReadOutput } from './ReadOutput';
|
|
8
|
+
import { WebFetchOutput } from './WebFetchOutput';
|
|
8
9
|
import { WriteOutput } from './WriteOutput';
|
|
9
10
|
|
|
10
11
|
/**
|
|
@@ -76,6 +77,8 @@ function renderToolOutput(
|
|
|
76
77
|
return <WriteOutput args={args} content={content} error={error} />;
|
|
77
78
|
case 'diff':
|
|
78
79
|
return <EditOutput args={args} content={content} error={error} hint={hint} />;
|
|
80
|
+
case 'webfetch':
|
|
81
|
+
return <WebFetchOutput args={args} error={error} />;
|
|
79
82
|
default:
|
|
80
83
|
return <GenericToolOutput name={name} args={args} content={content} error={error} hint={hint} />;
|
|
81
84
|
}
|