@agimon-ai/po-read 0.0.0-alpha.195 → 0.0.0-alpha.197
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/extensions/mcp-ui.mjs +6 -5
- package/dist/extensions/mcp-ui.mjs.map +1 -1
- package/dist/extensions/native.mjs +8 -7
- package/dist/extensions/native.mjs.map +1 -1
- package/dist/extensions/web.mjs +8 -7
- package/dist/extensions/web.mjs.map +1 -1
- package/dist/po-runtime-identity.json +1 -1
- package/package.json +9 -9
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { defineMcpWidget } from "@agimon-ai/po-core/web";
|
|
1
|
+
import { defineMcpWidget, useT } from "@agimon-ai/po-core/web";
|
|
2
2
|
import { McpToolFields, McpToolFrame, McpToolOutput } from "@agimon-ai/po-web-components";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
//#region src/extensions/workspaces/sessions/(frontend)/tool/read.mcp.tsx
|
|
5
5
|
function ReadMcpWidget(props) {
|
|
6
|
+
const t = useT();
|
|
6
7
|
return /* @__PURE__ */ jsxs(McpToolFrame, {
|
|
7
8
|
...props,
|
|
8
|
-
title: "Read file",
|
|
9
|
+
title: t("read.ui.mcpTitle", "Read file"),
|
|
9
10
|
children: [/* @__PURE__ */ jsx(McpToolFields, { fields: [
|
|
10
|
-
["Path", props.args.path],
|
|
11
|
-
["Offset", props.args.offset],
|
|
12
|
-
["Limit", props.args.limit]
|
|
11
|
+
[t("read.ui.mcpPath", "Path"), props.args.path],
|
|
12
|
+
[t("read.ui.mcpOffset", "Offset"), props.args.offset],
|
|
13
|
+
[t("read.ui.mcpLimit", "Limit"), props.args.limit]
|
|
13
14
|
] }), /* @__PURE__ */ jsx(McpToolOutput, { result: props.result })]
|
|
14
15
|
});
|
|
15
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-ui.mjs","names":["Widget0"],"sources":["../../src/extensions/workspaces/sessions/(frontend)/tool/read.mcp.tsx","../../generated/mcp-ui.ts"],"sourcesContent":["import { defineMcpWidget, type PoMcpWidgetProps } from '@agimon-ai/po-core/web';\nimport { McpToolFrame, McpToolFields, McpToolOutput } from '@agimon-ai/po-web-components';\n\nfunction ReadMcpWidget(props: PoMcpWidgetProps) {\n return (\n <McpToolFrame {...props} title
|
|
1
|
+
{"version":3,"file":"mcp-ui.mjs","names":["Widget0"],"sources":["../../src/extensions/workspaces/sessions/(frontend)/tool/read.mcp.tsx","../../generated/mcp-ui.ts"],"sourcesContent":["import { defineMcpWidget, useT, type PoMcpWidgetProps } from '@agimon-ai/po-core/web';\nimport { McpToolFrame, McpToolFields, McpToolOutput } from '@agimon-ai/po-web-components';\n\nfunction ReadMcpWidget(props: PoMcpWidgetProps) {\n const t = useT();\n return (\n <McpToolFrame {...props} title={t('read.ui.mcpTitle', 'Read file')}>\n <McpToolFields\n fields={[\n [t('read.ui.mcpPath', 'Path'), props.args.path],\n [t('read.ui.mcpOffset', 'Offset'), props.args.offset],\n [t('read.ui.mcpLimit', 'Limit'), props.args.limit],\n ]}\n />\n <McpToolOutput result={props.result} />\n </McpToolFrame>\n );\n}\n\nexport default defineMcpWidget(ReadMcpWidget);\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport type { ComponentType } from 'react';\nimport type { PoMcpWidgetProps } from '@agimon-ai/po-core/mcpWidget';\nimport Widget0 from \"../src/extensions/workspaces/sessions/(frontend)/tool/read.mcp\";\n\nexport const widgets: Readonly<Record<string, ComponentType<PoMcpWidgetProps>>> = {\n \"@agimon-ai/po-read/read\": Widget0,\n};\n"],"mappings":";;;;AAGA,SAAS,cAAc,OAAyB;CAC9C,MAAM,IAAI,KAAK;CACf,OACE,qBAAC,cAAD;EAAc,GAAI;EAAO,OAAO,EAAE,oBAAoB,WAAW;EAAjE,UAAA,CACE,oBAAC,eAAD,EACE,QAAQ;GACN,CAAC,EAAE,mBAAmB,MAAM,GAAG,MAAM,KAAK,IAAI;GAC9C,CAAC,EAAE,qBAAqB,QAAQ,GAAG,MAAM,KAAK,MAAM;GACpD,CAAC,EAAE,oBAAoB,OAAO,GAAG,MAAM,KAAK,KAAK;EACnD,EACD,CAAA,GACD,oBAAC,eAAD,EAAe,QAAQ,MAAM,OAAS,CAAA,CAC1B;;AAElB;;;ACZA,MAAa,UAAqE,EAChF,2BDaa,gBAAgB,aCbFA,EAC7B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineNativePlugin, defineToolRenderer } from "@agimon-ai/po-core/native";
|
|
1
|
+
import { defineNativePlugin, defineToolRenderer, useT } from "@agimon-ai/po-core/native";
|
|
2
2
|
import { View } from "react-native-unistyles/components/native/View";
|
|
3
3
|
import { Text } from "react-native-unistyles/components/native/Text";
|
|
4
4
|
import { HashlineLines, MessageItem, MessageItemBody, MessageItemHeader, MessageItemStatus, ToolPathLink, ToolResultImage, fontOf, hashlineBody, resultTextLines, toolTone } from "@agimon-ai/po-native-components";
|
|
@@ -9,12 +9,12 @@ function optionalNumber(value) {
|
|
|
9
9
|
return typeof value === "number" && Number.isFinite(value) ? value : void 0;
|
|
10
10
|
}
|
|
11
11
|
/** What the read call heading shows: the path, then the offset and limit when given. */
|
|
12
|
-
function readCallView(args) {
|
|
12
|
+
function readCallView(args, t) {
|
|
13
13
|
const offset = optionalNumber(args.offset);
|
|
14
14
|
const limit = optionalNumber(args.limit);
|
|
15
15
|
return {
|
|
16
16
|
path: typeof args.path === "string" ? args.path : "",
|
|
17
|
-
details: [offset === void 0 ? void 0 : `from ${offset}`, limit === void 0 ? void 0 : `${limit} lines`].filter((value) => value !== void 0 && value.length > 0)
|
|
17
|
+
details: [offset === void 0 ? void 0 : t?.("read.ui.fromLine", "from {line}", { line: offset }) ?? `from ${offset}`, limit === void 0 ? void 0 : t?.("read.ui.lines", "{count} lines", { count: limit }) ?? `${limit} lines`].filter((value) => value !== void 0 && value.length > 0)
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
const IMAGE_MIME_TYPES = /* @__PURE__ */ new Set([
|
|
@@ -46,7 +46,8 @@ const IMAGE_HEIGHT = 240;
|
|
|
46
46
|
*/
|
|
47
47
|
function ReadToolMessage(props) {
|
|
48
48
|
const { args, result, output, running, isError, fileTabFor, openTransientTab } = props;
|
|
49
|
-
const
|
|
49
|
+
const t = useT();
|
|
50
|
+
const view = readCallView(args, t);
|
|
50
51
|
const images = resultImages(result?.content ?? []);
|
|
51
52
|
const tab = fileTabFor(view.path);
|
|
52
53
|
const body = result === null || isError ? null : hashlineBody(result, output, "read", true);
|
|
@@ -75,7 +76,7 @@ function ReadToolMessage(props) {
|
|
|
75
76
|
testID: "tool-result-read",
|
|
76
77
|
children: [/* @__PURE__ */ jsx(MessageItemStatus, {
|
|
77
78
|
tone: "error",
|
|
78
|
-
children: "failed"
|
|
79
|
+
children: t("read.ui.failed", "failed")
|
|
79
80
|
}), resultTextLines(result, output).map((line, index) => /* @__PURE__ */ jsx(Text, {
|
|
80
81
|
selectable: true,
|
|
81
82
|
style: [styles.sans, styles.error],
|
|
@@ -85,7 +86,7 @@ function ReadToolMessage(props) {
|
|
|
85
86
|
testID: "tool-result-read",
|
|
86
87
|
children: /* @__PURE__ */ jsx(MessageItemStatus, {
|
|
87
88
|
tone: "running",
|
|
88
|
-
children: "running"
|
|
89
|
+
children: t("read.ui.running", "running")
|
|
89
90
|
})
|
|
90
91
|
}) : null : body.shown.length === 0 && body.notice === void 0 && images.length === 0 ? null : /* @__PURE__ */ jsxs(MessageItemBody, {
|
|
91
92
|
testID: "tool-result-read",
|
|
@@ -99,7 +100,7 @@ function ReadToolMessage(props) {
|
|
|
99
100
|
host: props,
|
|
100
101
|
data: image.data,
|
|
101
102
|
mimeType: image.mimeType,
|
|
102
|
-
accessibilityLabel:
|
|
103
|
+
accessibilityLabel: t("read.ui.resultImage", "Read result {index}", { index: index + 1 }),
|
|
103
104
|
testID: "tool-result-read-image",
|
|
104
105
|
resizeMode: "contain",
|
|
105
106
|
style: styles.image
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native.mjs","names":["ToolMessageRenderProps","fontOf","HashlineLines","hashlineBody","MessageItem","MessageItemBody","MessageItemHeader","MessageItemStatus","resultTextLines","ToolPathLink","toolTone","ToolResultImage","PoNativeTheme","StyleSheet","readCallView","resultImages","IMAGE_HEIGHT","ReadToolMessage","props","args","result","output","running","isError","fileTabFor","openTransientTab","view","images","content","tab","path","body","expanded","styles","summary","undefined","onOpen","details","length","sans","detail","join","map","line","index","String","error","shown","notice","gutter","image","mimeType","data","create","theme","flex","flexDirection","alignItems","gap","spacing","minWidth","uni__dependencies","fontFamily","fontSize","base","lineHeight","flexShrink","color","colors","faint","red","width","height","borderRadius","md","borderWidth","borderColor","toolRead"],"sources":["../../src/extensions/workspaces/sessions/(frontend)/tool/_lib/readToolView.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/ReadToolMessage.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/read.native.tsx","../../generated/native.ts"],"sourcesContent":["// Imports nothing at runtime: the web and native cards share it, and the native\n// bundle may not load the web component library.\n\nexport interface ReadCallView {\n readonly path: string;\n /** `from N` and `N lines`, as the TUI's call heading lists them. */\n readonly details: readonly string[];\n}\n\nfunction optionalNumber(value: unknown): number | undefined {\n return typeof value === 'number' && Number.isFinite(value) ? value : undefined;\n}\n\n/** What the read call heading shows: the path, then the offset and limit when given. */\nexport function readCallView(args: Readonly<Record<string, unknown>>): ReadCallView {\n const offset = optionalNumber(args.offset);\n const limit = optionalNumber(args.limit);\n return {\n path: typeof args.path === 'string' ? args.path : '',\n details: [\n offset === undefined ? undefined : `from ${offset}`,\n limit === undefined ? undefined : `${limit} lines`,\n ].filter((value): value is string => value !== undefined && value.length > 0),\n };\n}\n\nconst IMAGE_MIME_TYPES = new Set(['image/png', 'image/jpeg', 'image/gif', 'image/webp']);\n\n/** The image blocks a read returned, limited to the formats both cards can draw. */\nexport function resultImages(content: readonly unknown[]): Array<{ data: string; mimeType: string }> {\n return content.flatMap((block) => {\n if (typeof block !== 'object' || block === null || Array.isArray(block)) return [];\n const value = block as Record<string, unknown>;\n return value.type === 'image' &&\n typeof value.data === 'string' &&\n typeof value.mimeType === 'string' &&\n IMAGE_MIME_TYPES.has(value.mimeType)\n ? [{ data: value.data, mimeType: value.mimeType }]\n : [];\n });\n}\n","import type { ToolMessageRenderProps } from '@agimon-ai/po-core/native';\nimport {\n fontOf,\n HashlineLines,\n hashlineBody,\n MessageItem,\n MessageItemBody,\n MessageItemHeader,\n MessageItemStatus,\n resultTextLines,\n ToolPathLink,\n toolTone,\n ToolResultImage,\n} from '@agimon-ai/po-native-components';\nimport type { PoNativeTheme } from '@agimon-ai/po-web-components/nativeTheme';\nimport { Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport { readCallView, resultImages } from '../_lib/readToolView';\n\n/** Height an image result gets in the card; the web caps it at 24rem. */\nconst IMAGE_HEIGHT = 240;\n\n/**\n * The read tool's timeline item on native, as the web's ReadToolMessage: the\n * path and range in the header and, once expanded, the anchored lines with a\n * line-number gutter and any image the read returned, or the tool's message\n * in red when the read failed.\n */\nexport function ReadToolMessage(props: ToolMessageRenderProps) {\n const { args, result, output, running, isError, fileTabFor, openTransientTab } = props;\n const view = readCallView(args);\n const images = resultImages(result?.content ?? []);\n const tab = fileTabFor(view.path);\n const body = result === null || isError ? null : hashlineBody(result, output, 'read', true);\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable defaultExpanded={false}>\n {({ expanded }) => (\n <>\n <MessageItemHeader title=\"read\">\n <View testID=\"tool-call-read\" style={styles.summary}>\n <ToolPathLink path={view.path} {...(tab === undefined ? {} : { onOpen: () => openTransientTab(tab) })} />\n {view.details.length > 0 ? (\n <Text numberOfLines={1} style={[styles.sans, styles.detail]}>\n · {view.details.join(' · ')}\n </Text>\n ) : null}\n </View>\n </MessageItemHeader>\n {expanded ? (\n isError ? (\n <MessageItemBody testID=\"tool-result-read\">\n <MessageItemStatus tone=\"error\">failed</MessageItemStatus>\n {resultTextLines(result, output).map((line, index) => (\n <Text key={`${String(index)}-${line}`} selectable style={[styles.sans, styles.error]}>\n {line}\n </Text>\n ))}\n </MessageItemBody>\n ) : body === null ? (\n running ? (\n <MessageItemBody testID=\"tool-result-read\">\n <MessageItemStatus tone=\"running\">running</MessageItemStatus>\n </MessageItemBody>\n ) : null\n ) : body.shown.length === 0 && body.notice === undefined && images.length === 0 ? null : (\n <MessageItemBody testID=\"tool-result-read\">\n <HashlineLines lines={body.shown} gutter={body.gutter} path={view.path} />\n {images.map((image, index) => (\n <ToolResultImage\n key={`${image.mimeType}:${String(index)}`}\n host={props}\n data={image.data}\n mimeType={image.mimeType}\n accessibilityLabel={`Read result ${String(index + 1)}`}\n testID=\"tool-result-read-image\"\n resizeMode=\"contain\"\n style={styles.image}\n />\n ))}\n {body.notice !== undefined ? <Text style={[styles.sans, styles.detail]}>{body.notice}</Text> : null}\n </MessageItemBody>\n )\n ) : null}\n </>\n )}\n </MessageItem>\n );\n}\n\nconst styles = StyleSheet.create((theme: PoNativeTheme) => ({\n summary: { flex: 1, flexDirection: 'row', alignItems: 'center', gap: theme.spacing(2), minWidth: 0 },\n sans: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.base,\n lineHeight: theme.lineHeight.base,\n },\n detail: { flexShrink: 1, color: theme.colors.faint },\n error: { color: theme.colors.red },\n image: {\n width: '100%',\n height: IMAGE_HEIGHT,\n borderRadius: theme.borderRadius.md,\n borderWidth: 1,\n borderColor: theme.colors['border-soft'],\n },\n}));\n","import { defineToolRenderer } from '@agimon-ai/po-core/native';\n\nimport { ReadToolMessage } from './_components/ReadToolMessage.native';\n\nexport default defineToolRenderer({ message: ReadToolMessage });\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineNativePlugin, type WebPluginContributions } from '@agimon-ai/po-core/native';\n\nimport toolRead from '../src/extensions/workspaces/sessions/(frontend)/tool/read.native';\n\nconst via = <T>(identity: Record<string, unknown>, value: unknown): T =>\n (value === undefined ? undefined : { ...identity, ...(value as object) }) as T;\n\nexport const nativePlugin = defineNativePlugin({\n id: 'read',\n packageName: '@agimon-ai/po-read',\n session: {\n get toolRenderers(): WebPluginContributions['toolRenderers'] { return [via({ tools: ['read'] }, toolRead)]; },\n },\n});\n"],"mappings":";;;;;;;AASA,SAAS,eAAe,OAAoC;CAC1D,OAAO,OAAO,UAAU,YAAY,OAAO,SAAS,KAAK,IAAI,QAAQ,KAAA;AACvE;;AAGA,SAAgB,aAAa,MAAuD;CAClF,MAAM,SAAS,eAAe,KAAK,MAAM;CACzC,MAAM,QAAQ,eAAe,KAAK,KAAK;CACvC,OAAO;EACL,MAAM,OAAO,KAAK,SAAS,WAAW,KAAK,OAAO;EAClD,SAAS,CACP,WAAW,KAAA,IAAY,KAAA,IAAY,QAAQ,UAC3C,UAAU,KAAA,IAAY,KAAA,IAAY,GAAG,MAAM,OAC7C,CAAC,CAAC,QAAQ,UAA2B,UAAU,KAAA,KAAa,MAAM,SAAS,CAAC;CAC9E;AACF;AAEA,MAAM,mCAAmB,IAAI,IAAI;CAAC;CAAa;CAAc;CAAa;AAAY,CAAC;;AAGvF,SAAgB,aAAa,SAAwE;CACnG,OAAO,QAAQ,SAAS,UAAU;EAChC,IAAI,OAAO,UAAU,YAAY,UAAU,QAAQ,MAAM,QAAQ,KAAK,GAAG,OAAO,CAAC;EACjF,MAAM,QAAQ;EACd,OAAO,MAAM,SAAS,WACpB,OAAO,MAAM,SAAS,YACtB,OAAO,MAAM,aAAa,YAC1B,iBAAiB,IAAI,MAAM,QAAQ,IACjC,CAAC;GAAE,MAAM,MAAM;GAAM,UAAU,MAAM;EAAS,CAAC,IAC/C,CAAC;CACP,CAAC;AACH;;;;ACnBA,MAAMgB,eAAe;;;;;;;AAQrB,SAAgBC,gBAAgBC,OAA+B;CAC7D,MAAM,EAAEC,MAAMC,QAAQC,QAAQC,SAASC,SAASC,YAAYC,qBAAqBP;CAC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AO;EACLqB,OAAO;EACPC,QAAQxD;EACRyD,cAAcnB,MAAMmB,aAAaC;EACjCC,aAAa;EACbC,aAAatB,MAAMc,OAAO;EAAcP,mBAAA,CAAA,CAAA;CAC1C;AACF,EAAE;;;ACtGF,IAAA,sBAAe,mBAAmB,EAAE,SAAS,gBAAgB,CAAC;;;ACC9D,MAAM,OAAU,UAAmC,UAChD,UAAU,KAAA,IAAY,KAAA,IAAY;CAAE,GAAG;CAAU,GAAI;AAAiB;AAEzE,MAAa,eAAe,mBAAmB;CAC7C,IAAI;CACJ,aAAa;CACb,SAAS,EACP,IAAI,gBAAyD;EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,MAAM,EAAE,GAAGgB,mBAAQ,CAAC;CAAG,EAC9G;AACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"native.mjs","names":["useT","ToolMessageRenderProps","fontOf","HashlineLines","hashlineBody","MessageItem","MessageItemBody","MessageItemHeader","MessageItemStatus","resultTextLines","ToolPathLink","toolTone","ToolResultImage","PoNativeTheme","StyleSheet","readCallView","resultImages","IMAGE_HEIGHT","ReadToolMessage","props","args","result","output","running","isError","fileTabFor","openTransientTab","t","view","images","content","tab","path","body","expanded","styles","summary","undefined","onOpen","details","length","sans","detail","join","map","line","index","String","error","shown","notice","gutter","image","mimeType","data","create","theme","flex","flexDirection","alignItems","gap","spacing","minWidth","uni__dependencies","fontFamily","fontSize","base","lineHeight","flexShrink","color","colors","faint","red","width","height","borderRadius","md","borderWidth","borderColor","toolRead"],"sources":["../../src/extensions/workspaces/sessions/(frontend)/tool/_lib/readToolView.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/ReadToolMessage.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/read.native.tsx","../../generated/native.ts"],"sourcesContent":["// Imports nothing at runtime: the web and native cards share it, and the native\n// bundle may not load the web component library.\n\ntype Translate = (key: string, fallback: string, vars?: Readonly<Record<string, string | number>>) => string;\n\nexport interface ReadCallView {\n readonly path: string;\n /** `from N` and `N lines`, as the TUI's call heading lists them. */\n readonly details: readonly string[];\n}\n\nfunction optionalNumber(value: unknown): number | undefined {\n return typeof value === 'number' && Number.isFinite(value) ? value : undefined;\n}\n\n/** What the read call heading shows: the path, then the offset and limit when given. */\nexport function readCallView(args: Readonly<Record<string, unknown>>, t?: Translate): ReadCallView {\n const offset = optionalNumber(args.offset);\n const limit = optionalNumber(args.limit);\n return {\n path: typeof args.path === 'string' ? args.path : '',\n details: [\n offset === undefined ? undefined : (t?.('read.ui.fromLine', 'from {line}', { line: offset }) ?? `from ${offset}`),\n limit === undefined ? undefined : (t?.('read.ui.lines', '{count} lines', { count: limit }) ?? `${limit} lines`),\n ].filter((value): value is string => value !== undefined && value.length > 0),\n };\n}\n\nconst IMAGE_MIME_TYPES = new Set(['image/png', 'image/jpeg', 'image/gif', 'image/webp']);\n\n/** The image blocks a read returned, limited to the formats both cards can draw. */\nexport function resultImages(content: readonly unknown[]): Array<{ data: string; mimeType: string }> {\n return content.flatMap((block) => {\n if (typeof block !== 'object' || block === null || Array.isArray(block)) return [];\n const value = block as Record<string, unknown>;\n return value.type === 'image' &&\n typeof value.data === 'string' &&\n typeof value.mimeType === 'string' &&\n IMAGE_MIME_TYPES.has(value.mimeType)\n ? [{ data: value.data, mimeType: value.mimeType }]\n : [];\n });\n}\n","import { useT } from '@agimon-ai/po-core/native';\nimport type { ToolMessageRenderProps } from '@agimon-ai/po-core/native';\nimport {\n fontOf,\n HashlineLines,\n hashlineBody,\n MessageItem,\n MessageItemBody,\n MessageItemHeader,\n MessageItemStatus,\n resultTextLines,\n ToolPathLink,\n toolTone,\n ToolResultImage,\n} from '@agimon-ai/po-native-components';\nimport type { PoNativeTheme } from '@agimon-ai/po-web-components/nativeTheme';\nimport { Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport { readCallView, resultImages } from '../_lib/readToolView';\n\n/** Height an image result gets in the card; the web caps it at 24rem. */\nconst IMAGE_HEIGHT = 240;\n\n/**\n * The read tool's timeline item on native, as the web's ReadToolMessage: the\n * path and range in the header and, once expanded, the anchored lines with a\n * line-number gutter and any image the read returned, or the tool's message\n * in red when the read failed.\n */\nexport function ReadToolMessage(props: ToolMessageRenderProps) {\n const { args, result, output, running, isError, fileTabFor, openTransientTab } = props;\n const t = useT();\n const view = readCallView(args, t);\n const images = resultImages(result?.content ?? []);\n const tab = fileTabFor(view.path);\n const body = result === null || isError ? null : hashlineBody(result, output, 'read', true);\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable defaultExpanded={false}>\n {({ expanded }) => (\n <>\n {/* no-untranslated-jsx: ignore - Tool identifier matches the invocation. */}\n <MessageItemHeader title=\"read\">\n <View testID=\"tool-call-read\" style={styles.summary}>\n <ToolPathLink path={view.path} {...(tab === undefined ? {} : { onOpen: () => openTransientTab(tab) })} />\n {view.details.length > 0 ? (\n <Text numberOfLines={1} style={[styles.sans, styles.detail]}>\n · {view.details.join(' · ')}\n </Text>\n ) : null}\n </View>\n </MessageItemHeader>\n {expanded ? (\n isError ? (\n <MessageItemBody testID=\"tool-result-read\">\n <MessageItemStatus tone=\"error\">{t('read.ui.failed', 'failed')}</MessageItemStatus>\n {resultTextLines(result, output).map((line, index) => (\n <Text key={`${String(index)}-${line}`} selectable style={[styles.sans, styles.error]}>\n {line}\n </Text>\n ))}\n </MessageItemBody>\n ) : body === null ? (\n running ? (\n <MessageItemBody testID=\"tool-result-read\">\n <MessageItemStatus tone=\"running\">{t('read.ui.running', 'running')}</MessageItemStatus>\n </MessageItemBody>\n ) : null\n ) : body.shown.length === 0 && body.notice === undefined && images.length === 0 ? null : (\n <MessageItemBody testID=\"tool-result-read\">\n <HashlineLines lines={body.shown} gutter={body.gutter} path={view.path} />\n {images.map((image, index) => (\n <ToolResultImage\n key={`${image.mimeType}:${String(index)}`}\n host={props}\n data={image.data}\n mimeType={image.mimeType}\n accessibilityLabel={t('read.ui.resultImage', 'Read result {index}', { index: index + 1 })}\n testID=\"tool-result-read-image\"\n resizeMode=\"contain\"\n style={styles.image}\n />\n ))}\n {body.notice !== undefined ? <Text style={[styles.sans, styles.detail]}>{body.notice}</Text> : null}\n </MessageItemBody>\n )\n ) : null}\n </>\n )}\n </MessageItem>\n );\n}\n\nconst styles = StyleSheet.create((theme: PoNativeTheme) => ({\n summary: { flex: 1, flexDirection: 'row', alignItems: 'center', gap: theme.spacing(2), minWidth: 0 },\n sans: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.base,\n lineHeight: theme.lineHeight.base,\n },\n detail: { flexShrink: 1, color: theme.colors.faint },\n error: { color: theme.colors.red },\n image: {\n width: '100%',\n height: IMAGE_HEIGHT,\n borderRadius: theme.borderRadius.md,\n borderWidth: 1,\n borderColor: theme.colors['border-soft'],\n },\n}));\n","import { defineToolRenderer } from '@agimon-ai/po-core/native';\n\nimport { ReadToolMessage } from './_components/ReadToolMessage.native';\n\nexport default defineToolRenderer({ message: ReadToolMessage });\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineNativePlugin, type WebPluginContributions } from '@agimon-ai/po-core/native';\n\nimport toolRead from '../src/extensions/workspaces/sessions/(frontend)/tool/read.native';\n\nconst via = <T>(identity: Record<string, unknown>, value: unknown): T =>\n (value === undefined ? undefined : { ...identity, ...(value as object) }) as T;\n\nexport const nativePlugin = defineNativePlugin({\n id: 'read',\n packageName: '@agimon-ai/po-read',\n session: {\n get toolRenderers(): WebPluginContributions['toolRenderers'] { return [via({ tools: ['read'] }, toolRead)]; },\n },\n});\n"],"mappings":";;;;;;;AAWA,SAAS,eAAe,OAAoC;CAC1D,OAAO,OAAO,UAAU,YAAY,OAAO,SAAS,KAAK,IAAI,QAAQ,KAAA;AACvE;;AAGA,SAAgB,aAAa,MAAyC,GAA6B;CACjG,MAAM,SAAS,eAAe,KAAK,MAAM;CACzC,MAAM,QAAQ,eAAe,KAAK,KAAK;CACvC,OAAO;EACL,MAAM,OAAO,KAAK,SAAS,WAAW,KAAK,OAAO;EA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GAAG;CAAU,GAAI;AAAiB;AAEzE,MAAa,eAAe,mBAAmB;CAC7C,IAAI;CACJ,aAAa;CACb,SAAS,EACP,IAAI,gBAAyD;EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,MAAM,EAAE,GAAGgB,mBAAQ,CAAC;CAAG,EAC9G;AACF,CAAC"}
|
package/dist/extensions/web.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineToolRenderer, defineWebPlugin } from "@agimon-ai/po-core/web";
|
|
1
|
+
import { defineToolRenderer, defineWebPlugin, useT } from "@agimon-ai/po-core/web";
|
|
2
2
|
import { HashlineLines, MessageItem, MessageItemBody, MessageItemHeader, MessageItemStatus, ToolPathLink, ViewableImage, hashlineBody, resultTextLines, toolTone } from "@agimon-ai/po-web-components";
|
|
3
3
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
//#region src/extensions/workspaces/sessions/(frontend)/tool/_lib/readToolView.ts
|
|
@@ -6,12 +6,12 @@ function optionalNumber(value) {
|
|
|
6
6
|
return typeof value === "number" && Number.isFinite(value) ? value : void 0;
|
|
7
7
|
}
|
|
8
8
|
/** What the read call heading shows: the path, then the offset and limit when given. */
|
|
9
|
-
function readCallView(args) {
|
|
9
|
+
function readCallView(args, t) {
|
|
10
10
|
const offset = optionalNumber(args.offset);
|
|
11
11
|
const limit = optionalNumber(args.limit);
|
|
12
12
|
return {
|
|
13
13
|
path: typeof args.path === "string" ? args.path : "",
|
|
14
|
-
details: [offset === void 0 ? void 0 : `from ${offset}`, limit === void 0 ? void 0 : `${limit} lines`].filter((value) => value !== void 0 && value.length > 0)
|
|
14
|
+
details: [offset === void 0 ? void 0 : t?.("read.ui.fromLine", "from {line}", { line: offset }) ?? `from ${offset}`, limit === void 0 ? void 0 : t?.("read.ui.lines", "{count} lines", { count: limit }) ?? `${limit} lines`].filter((value) => value !== void 0 && value.length > 0)
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
17
|
const IMAGE_MIME_TYPES = /* @__PURE__ */ new Set([
|
|
@@ -40,7 +40,8 @@ function resultImages(content) {
|
|
|
40
40
|
* tool's message in red inside the expanded body instead.
|
|
41
41
|
*/
|
|
42
42
|
function ReadToolMessage({ args, result, output, running, isError, fileTabFor, openTransientTab }) {
|
|
43
|
-
const
|
|
43
|
+
const t = useT();
|
|
44
|
+
const view = readCallView(args, t);
|
|
44
45
|
const images = resultImages(result?.content ?? []);
|
|
45
46
|
const tab = fileTabFor(view.path);
|
|
46
47
|
const body = result === null || isError ? null : hashlineBody(result, output, "read", true);
|
|
@@ -70,7 +71,7 @@ function ReadToolMessage({ args, result, output, running, isError, fileTabFor, o
|
|
|
70
71
|
className: "flex flex-col",
|
|
71
72
|
children: [/* @__PURE__ */ jsx(MessageItemStatus, {
|
|
72
73
|
tone: "error",
|
|
73
|
-
children: "failed"
|
|
74
|
+
children: t("read.ui.failed", "failed")
|
|
74
75
|
}), resultTextLines(result, output).map((line, index) => /* @__PURE__ */ jsx("span", {
|
|
75
76
|
className: "whitespace-pre-wrap break-words text-po-red",
|
|
76
77
|
children: line
|
|
@@ -79,7 +80,7 @@ function ReadToolMessage({ args, result, output, running, isError, fileTabFor, o
|
|
|
79
80
|
"data-testid": "tool-result-read",
|
|
80
81
|
children: /* @__PURE__ */ jsx(MessageItemStatus, {
|
|
81
82
|
tone: "running",
|
|
82
|
-
children: "running"
|
|
83
|
+
children: t("read.ui.running", "running")
|
|
83
84
|
})
|
|
84
85
|
}) : null : body.shown.length === 0 && body.notice === void 0 && images.length === 0 ? null : /* @__PURE__ */ jsxs(MessageItemBody, {
|
|
85
86
|
"data-testid": "tool-result-read",
|
|
@@ -92,7 +93,7 @@ function ReadToolMessage({ args, result, output, running, isError, fileTabFor, o
|
|
|
92
93
|
}),
|
|
93
94
|
images.map((image, index) => /* @__PURE__ */ jsx(ViewableImage, {
|
|
94
95
|
src: `data:${image.mimeType};base64,${image.data}`,
|
|
95
|
-
alt:
|
|
96
|
+
alt: t("read.ui.resultImage", "Read result {index}", { index: index + 1 }),
|
|
96
97
|
"data-testid": "tool-result-read-image",
|
|
97
98
|
className: "h-auto max-h-96 max-w-full rounded-md border border-po-border-soft object-contain"
|
|
98
99
|
}, `${image.mimeType}:${String(index)}`)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.mjs","names":["toolRead"],"sources":["../../src/extensions/workspaces/sessions/(frontend)/tool/_lib/readToolView.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/ReadToolMessage.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/read.web.tsx","../../generated/web.ts"],"sourcesContent":["// Imports nothing at runtime: the web and native cards share it, and the native\n// bundle may not load the web component library.\n\nexport interface ReadCallView {\n readonly path: string;\n /** `from N` and `N lines`, as the TUI's call heading lists them. */\n readonly details: readonly string[];\n}\n\nfunction optionalNumber(value: unknown): number | undefined {\n return typeof value === 'number' && Number.isFinite(value) ? value : undefined;\n}\n\n/** What the read call heading shows: the path, then the offset and limit when given. */\nexport function readCallView(args: Readonly<Record<string, unknown>>): ReadCallView {\n const offset = optionalNumber(args.offset);\n const limit = optionalNumber(args.limit);\n return {\n path: typeof args.path === 'string' ? args.path : '',\n details: [\n offset === undefined ? undefined : `from ${offset}`,\n limit === undefined ? undefined : `${limit} lines`,\n ].filter((value): value is string => value !== undefined && value.length > 0),\n };\n}\n\nconst IMAGE_MIME_TYPES = new Set(['image/png', 'image/jpeg', 'image/gif', 'image/webp']);\n\n/** The image blocks a read returned, limited to the formats both cards can draw. */\nexport function resultImages(content: readonly unknown[]): Array<{ data: string; mimeType: string }> {\n return content.flatMap((block) => {\n if (typeof block !== 'object' || block === null || Array.isArray(block)) return [];\n const value = block as Record<string, unknown>;\n return value.type === 'image' &&\n typeof value.data === 'string' &&\n typeof value.mimeType === 'string' &&\n IMAGE_MIME_TYPES.has(value.mimeType)\n ? [{ data: value.data, mimeType: value.mimeType }]\n : [];\n });\n}\n","import type { ToolMessageRenderProps } from '@agimon-ai/po-core/web';\nimport {\n HashlineLines,\n hashlineBody,\n MessageItem,\n MessageItemBody,\n MessageItemHeader,\n MessageItemStatus,\n resultTextLines,\n ToolPathLink,\n toolTone,\n ViewableImage,\n} from '@agimon-ai/po-web-components';\n\nimport { readCallView, resultImages } from '../_lib/readToolView';\n\n/**\n * The read tool's timeline item, the web half of its renderCall and\n * renderResult: the call summary in the header and, when expanded, the\n * anchored lines with a line-number gutter in the body. A failure shows the\n * tool's message in red inside the expanded body instead.\n */\nexport function ReadToolMessage({\n args,\n result,\n output,\n running,\n isError,\n fileTabFor,\n openTransientTab,\n}: ToolMessageRenderProps) {\n const view = readCallView(args);\n const images = resultImages(result?.content ?? []);\n // A read is the one call whose file the session usually has not changed, so\n // this is the link that opens it read-only rather than in its history.\n const tab = fileTabFor(view.path);\n const body = result === null || isError ? null : hashlineBody(result, output, 'read', true);\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable defaultExpanded={false}>\n {({ expanded }) => {\n return (\n <>\n <MessageItemHeader title=\"read\">\n <span data-testid=\"tool-call-read\" className=\"flex min-w-0 flex-1 items-center gap-2\">\n <ToolPathLink\n path={view.path}\n {...(tab === undefined ? {} : { onOpen: () => openTransientTab(tab) })}\n />\n {view.details.length > 0 ? (\n <span className=\"shrink-0 text-po-faint\">· {view.details.join(' · ')}</span>\n ) : null}\n </span>\n </MessageItemHeader>\n {expanded ? (\n isError ? (\n <MessageItemBody data-testid=\"tool-result-read\" className=\"flex flex-col\">\n <MessageItemStatus tone=\"error\">failed</MessageItemStatus>\n {resultTextLines(result, output).map((line, index) => (\n <span key={`${String(index)}-${line}`} className=\"whitespace-pre-wrap break-words text-po-red\">\n {line}\n </span>\n ))}\n </MessageItemBody>\n ) : body === null ? (\n running ? (\n <MessageItemBody data-testid=\"tool-result-read\">\n <MessageItemStatus tone=\"running\">running</MessageItemStatus>\n </MessageItemBody>\n ) : null\n ) : body.shown.length === 0 && body.notice === undefined && images.length === 0 ? null : (\n <MessageItemBody data-testid=\"tool-result-read\" className=\"flex flex-col gap-1\">\n {/* A read body is one file with no heading of its own, so the\n call's path is what names the grammar for it. */}\n <HashlineLines lines={body.shown} gutter={body.gutter} path={view.path} />\n {images.map((image, index) => (\n <ViewableImage\n key={`${image.mimeType}:${String(index)}`}\n src={`data:${image.mimeType};base64,${image.data}`}\n alt={`Read result ${String(index + 1)}`}\n data-testid=\"tool-result-read-image\"\n className=\"h-auto max-h-96 max-w-full rounded-md border border-po-border-soft object-contain\"\n />\n ))}\n {body.notice !== undefined ? <span className=\"text-po-faint\">{body.notice}</span> : null}\n </MessageItemBody>\n )\n ) : null}\n </>\n );\n }}\n </MessageItem>\n );\n}\n","import { defineToolRenderer } from '@agimon-ai/po-core/web';\n\nimport { ReadToolMessage } from './_components/ReadToolMessage';\n\nexport default defineToolRenderer({ message: ReadToolMessage });\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineWebPlugin, type WebPluginContributions } from '@agimon-ai/po-core/web';\n\nimport toolRead from '../src/extensions/workspaces/sessions/(frontend)/tool/read.web';\n\nconst via = <T>(identity: Record<string, unknown>, value: unknown): T =>\n (value === undefined ? undefined : { ...identity, ...(value as object) }) as T;\n\nexport const webPlugin = defineWebPlugin({\n id: 'read',\n packageName: '@agimon-ai/po-read',\n session: {\n get toolRenderers(): WebPluginContributions['toolRenderers'] { return [via({ tools: ['read'] }, toolRead)]; },\n },\n});\n"],"mappings":";;;;AASA,SAAS,eAAe,OAAoC;CAC1D,OAAO,OAAO,UAAU,YAAY,OAAO,SAAS,KAAK,IAAI,QAAQ,KAAA;AACvE;;AAGA,SAAgB,aAAa,MAAuD;CAClF,MAAM,SAAS,eAAe,KAAK,MAAM;CACzC,MAAM,QAAQ,eAAe,KAAK,KAAK;CACvC,OAAO;EACL,MAAM,OAAO,KAAK,SAAS,WAAW,KAAK,OAAO;EAClD,SAAS,CACP,WAAW,KAAA,IAAY,KAAA,IAAY,QAAQ,UAC3C,UAAU,KAAA,IAAY,KAAA,IAAY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U,GAAI;AAAiB;AAEzE,MAAa,YAAY,gBAAgB;CACvC,IAAI;CACJ,aAAa;CACb,SAAS,EACP,IAAI,gBAAyD;EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,MAAM,EAAE,GAAGA,gBAAQ,CAAC;CAAG,EAC9G;AACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"web.mjs","names":["toolRead"],"sources":["../../src/extensions/workspaces/sessions/(frontend)/tool/_lib/readToolView.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/ReadToolMessage.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/read.web.tsx","../../generated/web.ts"],"sourcesContent":["// Imports nothing at runtime: the web and native cards share it, and the native\n// bundle may not load the web component library.\n\ntype Translate = (key: string, fallback: string, vars?: Readonly<Record<string, string | number>>) => string;\n\nexport interface ReadCallView {\n readonly path: string;\n /** `from N` and `N lines`, as the TUI's call heading lists them. */\n readonly details: readonly string[];\n}\n\nfunction optionalNumber(value: unknown): number | undefined {\n return typeof value === 'number' && Number.isFinite(value) ? value : undefined;\n}\n\n/** What the read call heading shows: the path, then the offset and limit when given. */\nexport function readCallView(args: Readonly<Record<string, unknown>>, t?: Translate): ReadCallView {\n const offset = optionalNumber(args.offset);\n const limit = optionalNumber(args.limit);\n return {\n path: typeof args.path === 'string' ? args.path : '',\n details: [\n offset === undefined ? undefined : (t?.('read.ui.fromLine', 'from {line}', { line: offset }) ?? `from ${offset}`),\n limit === undefined ? undefined : (t?.('read.ui.lines', '{count} lines', { count: limit }) ?? `${limit} lines`),\n ].filter((value): value is string => value !== undefined && value.length > 0),\n };\n}\n\nconst IMAGE_MIME_TYPES = new Set(['image/png', 'image/jpeg', 'image/gif', 'image/webp']);\n\n/** The image blocks a read returned, limited to the formats both cards can draw. */\nexport function resultImages(content: readonly unknown[]): Array<{ data: string; mimeType: string }> {\n return content.flatMap((block) => {\n if (typeof block !== 'object' || block === null || Array.isArray(block)) return [];\n const value = block as Record<string, unknown>;\n return value.type === 'image' &&\n typeof value.data === 'string' &&\n typeof value.mimeType === 'string' &&\n IMAGE_MIME_TYPES.has(value.mimeType)\n ? [{ data: value.data, mimeType: value.mimeType }]\n : [];\n });\n}\n","import { useT } from '@agimon-ai/po-core/web';\nimport type { ToolMessageRenderProps } from '@agimon-ai/po-core/web';\nimport {\n HashlineLines,\n hashlineBody,\n MessageItem,\n MessageItemBody,\n MessageItemHeader,\n MessageItemStatus,\n resultTextLines,\n ToolPathLink,\n toolTone,\n ViewableImage,\n} from '@agimon-ai/po-web-components';\n\nimport { readCallView, resultImages } from '../_lib/readToolView';\n\n/**\n * The read tool's timeline item, the web half of its renderCall and\n * renderResult: the call summary in the header and, when expanded, the\n * anchored lines with a line-number gutter in the body. A failure shows the\n * tool's message in red inside the expanded body instead.\n */\nexport function ReadToolMessage({\n args,\n result,\n output,\n running,\n isError,\n fileTabFor,\n openTransientTab,\n}: ToolMessageRenderProps) {\n const t = useT();\n const view = readCallView(args, t);\n const images = resultImages(result?.content ?? []);\n // A read is the one call whose file the session usually has not changed, so\n // this is the link that opens it read-only rather than in its history.\n const tab = fileTabFor(view.path);\n const body = result === null || isError ? null : hashlineBody(result, output, 'read', true);\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable defaultExpanded={false}>\n {({ expanded }) => {\n return (\n <>\n {/* no-untranslated-jsx: ignore - Tool identifier matches the invocation. */}\n <MessageItemHeader title=\"read\">\n <span data-testid=\"tool-call-read\" className=\"flex min-w-0 flex-1 items-center gap-2\">\n <ToolPathLink\n path={view.path}\n {...(tab === undefined ? {} : { onOpen: () => openTransientTab(tab) })}\n />\n {view.details.length > 0 ? (\n <span className=\"shrink-0 text-po-faint\">· {view.details.join(' · ')}</span>\n ) : null}\n </span>\n </MessageItemHeader>\n {expanded ? (\n isError ? (\n <MessageItemBody data-testid=\"tool-result-read\" className=\"flex flex-col\">\n <MessageItemStatus tone=\"error\">{t('read.ui.failed', 'failed')}</MessageItemStatus>\n {resultTextLines(result, output).map((line, index) => (\n <span key={`${String(index)}-${line}`} className=\"whitespace-pre-wrap break-words text-po-red\">\n {line}\n </span>\n ))}\n </MessageItemBody>\n ) : body === null ? (\n running ? (\n <MessageItemBody data-testid=\"tool-result-read\">\n <MessageItemStatus tone=\"running\">{t('read.ui.running', 'running')}</MessageItemStatus>\n </MessageItemBody>\n ) : null\n ) : body.shown.length === 0 && body.notice === undefined && images.length === 0 ? null : (\n <MessageItemBody data-testid=\"tool-result-read\" className=\"flex flex-col gap-1\">\n {/* A read body is one file with no heading of its own, so the\n call's path is what names the grammar for it. */}\n <HashlineLines lines={body.shown} gutter={body.gutter} path={view.path} />\n {images.map((image, index) => (\n <ViewableImage\n key={`${image.mimeType}:${String(index)}`}\n src={`data:${image.mimeType};base64,${image.data}`}\n alt={t('read.ui.resultImage', 'Read result {index}', { index: index + 1 })}\n data-testid=\"tool-result-read-image\"\n className=\"h-auto max-h-96 max-w-full rounded-md border border-po-border-soft object-contain\"\n />\n ))}\n {body.notice !== undefined ? <span className=\"text-po-faint\">{body.notice}</span> : null}\n </MessageItemBody>\n )\n ) : null}\n </>\n );\n }}\n </MessageItem>\n );\n}\n","import { defineToolRenderer } from '@agimon-ai/po-core/web';\n\nimport { ReadToolMessage } from './_components/ReadToolMessage';\n\nexport default defineToolRenderer({ message: ReadToolMessage });\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineWebPlugin, type WebPluginContributions } from '@agimon-ai/po-core/web';\n\nimport toolRead from '../src/extensions/workspaces/sessions/(frontend)/tool/read.web';\n\nconst via = <T>(identity: Record<string, unknown>, value: unknown): T =>\n (value === undefined ? undefined : { ...identity, ...(value as object) }) as T;\n\nexport const webPlugin = defineWebPlugin({\n id: 'read',\n packageName: '@agimon-ai/po-read',\n session: {\n get toolRenderers(): WebPluginContributions['toolRenderers'] { return [via({ tools: ['read'] }, toolRead)]; },\n },\n});\n"],"mappings":";;;;AAWA,SAAS,eAAe,OAAoC;CAC1D,OAAO,OAAO,UAAU,YAAY,OAAO,S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AD;MAEE,KAAK,QAAQ,MAAM,SAAS,UAAU,MAAM;MAC5C,KAAK,EAAE,uBAAuB,uBAAuB,EAAE,OAAO,QAAQ,EAAE,CAAC;MACzE,eAAY;MACZ,WAAU;KACX,GALM,GAAG,MAAM,SAAS,GAAG,OAAO,KAAK,GAKvC,CACF;KACA,KAAK,WAAW,KAAA,IAAY,oBAAC,QAAD;MAAM,WAAU;MAAiB,UAAA,KAAK;KAAa,CAAA,IAAI;IACrE;GAEjB,CAAA,IAAA,IACJ,EAAA,CAAA;EAEN;CACW,CAAA;AAEjB;;;AC3FA,IAAA,mBAAe,mBAAmB,EAAE,SAAS,gBAAgB,CAAC;;;ACC9D,MAAM,OAAU,UAAmC,UAChD,UAAU,KAAA,IAAY,KAAA,IAAY;CAAE,GAAG;CAAU,GAAI;AAAiB;AAEzE,MAAa,YAAY,gBAAgB;CACvC,IAAI;CACJ,aAAa;CACb,SAAS,EACP,IAAI,gBAAyD;EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,MAAM,EAAE,GAAGA,gBAAQ,CAAC;CAAG,EAC9G;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":1,"platformRequirements":{},"sourceFiles":["NOTICE","generated/mcp-ui.ts","generated/mcp.ts","generated/native.ts","generated/server.ts","generated/web.ts","package.json","src/constants/package.ts","src/exports/apiContracts.ts","src/exports/index.ts","src/extensions/workspaces/sessions/(backend)/tool/read.mcp.ts","src/extensions/workspaces/sessions/(backend)/tool/read.server.ts","src/extensions/workspaces/sessions/(frontend)/tool/_components/ReadToolMessage.native.stories.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ReadToolMessage.native.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ReadToolMessage.stories.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ReadToolMessage.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_lib/readToolView.ts","src/extensions/workspaces/sessions/(frontend)/tool/read.mcp.tsx","src/extensions/workspaces/sessions/(frontend)/tool/read.native.tsx","src/extensions/workspaces/sessions/(frontend)/tool/read.web.tsx","src/schemas/apiContracts.ts","src/schemas/readTool.ts","src/services/readHost/index.edge.ts","src/services/readHost/index.ts","src/services/readHost/type.ts","src/services/readImage/index.ts","src/services/readTool/index.ts","tsdown.config.ts"],"sourceRevision":"
|
|
1
|
+
{"version":1,"platformRequirements":{},"sourceFiles":["NOTICE","generated/mcp-ui.ts","generated/mcp.ts","generated/native.ts","generated/server.ts","generated/web.ts","package.json","src/constants/package.ts","src/exports/apiContracts.ts","src/exports/index.ts","src/extensions/workspaces/sessions/(backend)/tool/read.mcp.ts","src/extensions/workspaces/sessions/(backend)/tool/read.server.ts","src/extensions/workspaces/sessions/(frontend)/tool/_components/ReadToolMessage.native.stories.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ReadToolMessage.native.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ReadToolMessage.stories.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ReadToolMessage.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_lib/readToolView.ts","src/extensions/workspaces/sessions/(frontend)/tool/read.mcp.tsx","src/extensions/workspaces/sessions/(frontend)/tool/read.native.tsx","src/extensions/workspaces/sessions/(frontend)/tool/read.web.tsx","src/schemas/apiContracts.ts","src/schemas/readTool.ts","src/services/readHost/index.edge.ts","src/services/readHost/index.ts","src/services/readHost/type.ts","src/services/readImage/index.ts","src/services/readTool/index.ts","tsdown.config.ts"],"sourceRevision":"739df0ff0f63a96f9dde7b4a3af9c115","manifestRevision":"d50e63eadb73108455ec54f1c364f19a","outputFiles":["NOTICE","dist/apiContracts.cjs","dist/apiContracts.mjs","dist/extensions/mcp-ui.mjs","dist/extensions/mcp.cjs","dist/extensions/mcp.mjs","dist/extensions/native.mjs","dist/extensions/server.cjs","dist/extensions/server.mjs","dist/extensions/web.mjs","dist/index.cjs","dist/index.mjs","dist/readTool-CCyLjl3E.mjs","dist/readTool-DQSyk5NY.cjs"],"outputRevision":"cc9b8851454c3ebd549e4b29f64247f8"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agimon-ai/po-read",
|
|
3
|
-
"version": "0.0.0-alpha.
|
|
3
|
+
"version": "0.0.0-alpha.197",
|
|
4
4
|
"description": "Snapshot-bound hashline read tool for Pi and Po.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -61,17 +61,17 @@
|
|
|
61
61
|
"access": "public"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@agimon-ai/po-config": "0.0.0-alpha.
|
|
65
|
-
"@agimon-ai/po-core": "0.0.0-alpha.
|
|
66
|
-
"@agimon-ai/po-hashline": "0.0.0-alpha.
|
|
67
|
-
"@agimon-ai/po-ui": "0.0.0-alpha.
|
|
68
|
-
"@agimon-ai/po-web-components": "0.0.0-alpha.
|
|
64
|
+
"@agimon-ai/po-config": "0.0.0-alpha.197",
|
|
65
|
+
"@agimon-ai/po-core": "0.0.0-alpha.197",
|
|
66
|
+
"@agimon-ai/po-hashline": "0.0.0-alpha.197",
|
|
67
|
+
"@agimon-ai/po-ui": "0.0.0-alpha.197",
|
|
68
|
+
"@agimon-ai/po-web-components": "0.0.0-alpha.197",
|
|
69
69
|
"@deepseek-ai/cordis": "4.0.5",
|
|
70
70
|
"typebox": "1.4.2"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
|
-
"@agimon-ai/po-build": "0.0.0-alpha.
|
|
74
|
-
"@agimon-ai/po-native-components": "0.0.0-alpha.
|
|
73
|
+
"@agimon-ai/po-build": "0.0.0-alpha.197",
|
|
74
|
+
"@agimon-ai/po-native-components": "0.0.0-alpha.197",
|
|
75
75
|
"@earendil-works/pi-coding-agent": "1.6.1",
|
|
76
76
|
"@earendil-works/pi-durable": "1.6.1",
|
|
77
77
|
"@tanstack/react-store": "0.11.2",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"vitest": "5.0.4"
|
|
89
89
|
},
|
|
90
90
|
"peerDependencies": {
|
|
91
|
-
"@agimon-ai/po-native-components": "0.0.0-alpha.
|
|
91
|
+
"@agimon-ai/po-native-components": "0.0.0-alpha.197",
|
|
92
92
|
"@earendil-works/pi-coding-agent": "1.6.1",
|
|
93
93
|
"react-native": "0.88.1",
|
|
94
94
|
"react-native-unistyles": "^3.5.3"
|