@pentoshi/clai 3.8.25 → 3.8.28
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/agent/context-manager.js +12 -0
- package/dist/agent/context-manager.js.map +1 -1
- package/dist/agent/loop-guard.d.ts +3 -0
- package/dist/agent/loop-guard.js +15 -11
- package/dist/agent/loop-guard.js.map +1 -1
- package/dist/agent/message-slim.d.ts +26 -0
- package/dist/agent/message-slim.js +75 -0
- package/dist/agent/message-slim.js.map +1 -0
- package/dist/agent/runner.js +6 -3
- package/dist/agent/runner.js.map +1 -1
- package/dist/agent/stop-summary.js +1 -0
- package/dist/agent/stop-summary.js.map +1 -1
- package/dist/agent/tool-history.d.ts +5 -0
- package/dist/agent/tool-history.js +14 -1
- package/dist/agent/tool-history.js.map +1 -1
- package/dist/agent/tool-output-formatting.js +8 -0
- package/dist/agent/tool-output-formatting.js.map +1 -1
- package/dist/app/adapters/current-jobs-adapter.js +3 -3
- package/dist/app/adapters/current-jobs-adapter.js.map +1 -1
- package/dist/app/controllers/job-controller.d.ts +4 -3
- package/dist/app/controllers/job-controller.js +6 -6
- package/dist/app/controllers/job-controller.js.map +1 -1
- package/dist/app/ports/jobs-port.d.ts +4 -3
- package/dist/tools/file-diff.d.ts +6 -2
- package/dist/tools/file-diff.js +27 -5
- package/dist/tools/file-diff.js.map +1 -1
- package/dist/tools/jobs.d.ts +24 -3
- package/dist/tools/jobs.js +159 -15
- package/dist/tools/jobs.js.map +1 -1
- package/dist/tools/registry.js +17 -3
- package/dist/tools/registry.js.map +1 -1
- package/dist/tools/shell.js +6 -1
- package/dist/tools/shell.js.map +1 -1
- package/dist/tools/tool-types.d.ts +2 -0
- package/dist/tui-v2/app/commands/picker-commands.js +5 -3
- package/dist/tui-v2/app/commands/picker-commands.js.map +1 -1
- package/dist/tui-v2/components/transcript/linkable-text.d.ts +5 -0
- package/dist/tui-v2/components/transcript/linkable-text.js +7 -9
- package/dist/tui-v2/components/transcript/linkable-text.js.map +1 -1
- package/dist/tui-v2/components/transcript/transcript-row.js +1 -1
- package/dist/tui-v2/components/transcript/transcript-row.js.map +1 -1
- package/dist/tui-v2/components/transcript/user-message.d.ts +3 -1
- package/dist/tui-v2/components/transcript/user-message.js +19 -2
- package/dist/tui-v2/components/transcript/user-message.js.map +1 -1
- package/dist/tui-v2/rendering/user-message-wrap.d.ts +16 -0
- package/dist/tui-v2/rendering/user-message-wrap.js +21 -0
- package/dist/tui-v2/rendering/user-message-wrap.js.map +1 -0
- package/dist/version.generated.d.ts +2 -2
- package/dist/version.generated.js +2 -2
- package/package.json +1 -1
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
|
|
2
|
+
/** @jsxImportSource @opentui/react */
|
|
3
|
+
/** Renders a `UserItem` (CHAT-001, V2-051). */
|
|
4
|
+
import { useMemo } from "react";
|
|
2
5
|
import { TextAttributes } from "@opentui/core";
|
|
6
|
+
import { useTerminalDimensions } from "@opentui/react";
|
|
7
|
+
import { wrapUserPrompt } from "../../rendering/user-message-wrap.js";
|
|
3
8
|
import { LinkableText } from "./linkable-text.js";
|
|
4
9
|
import { useClickWithoutDrag } from "./use-click-without-drag.js";
|
|
5
10
|
export function UserMessage(props) {
|
|
6
|
-
const { item, theme, onOpen } = props;
|
|
11
|
+
const { item, theme, onOpen, contentWidth } = props;
|
|
12
|
+
const { width: termWidth } = useTerminalDimensions();
|
|
13
|
+
// Prefer shell chat width so prompts reflow when the tasks pane is open;
|
|
14
|
+
// fall back to term−chrome when contentWidth is not threaded yet.
|
|
15
|
+
const wrapBudget = Math.max(20, contentWidth != null ? contentWidth : Math.max(40, termWidth - 8));
|
|
16
|
+
const lines = useMemo(() => wrapUserPrompt(item.text, wrapBudget), [item.text, wrapBudget]);
|
|
7
17
|
// Text is selectable for drag-copy; click (no drag) opens prompt actions.
|
|
8
18
|
const click = useClickWithoutDrag(() => onOpen(item.text));
|
|
9
19
|
return (_jsxs("box", { id: item.id, border: true, borderStyle: "rounded", style: {
|
|
@@ -19,6 +29,13 @@ export function UserMessage(props) {
|
|
|
19
29
|
fg: theme.white,
|
|
20
30
|
bg: theme.prompt,
|
|
21
31
|
attributes: TextAttributes.BOLD,
|
|
22
|
-
|
|
32
|
+
flexShrink: 0,
|
|
33
|
+
}, children: " YOU " }), _jsx("text", { content: " ", selectable: true, style: { flexShrink: 0 } }), _jsx("box", { style: {
|
|
34
|
+
flexGrow: 1,
|
|
35
|
+
flexShrink: 1,
|
|
36
|
+
minWidth: 0,
|
|
37
|
+
flexDirection: "column",
|
|
38
|
+
width: "100%",
|
|
39
|
+
}, children: lines.map((line, i) => (_jsx(LinkableText, { text: line, theme: theme, selectable: true, wrapMode: "none" }, i))) })] }));
|
|
23
40
|
}
|
|
24
41
|
//# sourceMappingURL=user-message.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-message.js","sourceRoot":"","sources":["../../../../src/tui-v2/components/transcript/user-message.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"user-message.js","sourceRoot":"","sources":["../../../../src/tui-v2/components/transcript/user-message.tsx"],"names":[],"mappings":";AAAA,sCAAsC;AACtC,+CAA+C;AAE/C,OAAO,EAAE,OAAO,EAAkB,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAGvD,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAElE,MAAM,UAAU,WAAW,CAAC,KAM3B;IACC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC;IACpD,MAAM,EAAE,KAAK,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cACE,KAAK,EAAE;oBACL,QAAQ,EAAE,CAAC;oBACX,UAAU,EAAE,CAAC;oBACb,QAAQ,EAAE,CAAC;oBACX,aAAa,EAAE,QAAQ;oBACvB,KAAK,EAAE,MAAM;iBACd,YAEA,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAGtB,KAAC,YAAY,IAEX,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,UAAU,QACV,QAAQ,EAAC,MAAM,IAJV,CAAC,CAKN,CACH,CAAC,GACE,IACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Soft-wrap helpers for user prompt bubbles in the transcript.
|
|
3
|
+
*
|
|
4
|
+
* Long prompts must reflow to the chat-pane width when the tasks pane is open
|
|
5
|
+
* (assistant markdown already does this). Never ellipsis-truncate.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Columns reserved for the YOU badge + gap + box padding/border.
|
|
9
|
+
* " YOU " (5) + gap (1) + horizontal padding (2) + border (2) ≈ 10.
|
|
10
|
+
*/
|
|
11
|
+
export declare const USER_MESSAGE_CHROME_COLS = 10;
|
|
12
|
+
/**
|
|
13
|
+
* Soft-wrap a user prompt to the chat-pane width (plan split already subtracted).
|
|
14
|
+
* Never ellipsis-truncates — every character lands on some line.
|
|
15
|
+
*/
|
|
16
|
+
export declare function wrapUserPrompt(text: string, contentWidth: number): string[];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Soft-wrap helpers for user prompt bubbles in the transcript.
|
|
3
|
+
*
|
|
4
|
+
* Long prompts must reflow to the chat-pane width when the tasks pane is open
|
|
5
|
+
* (assistant markdown already does this). Never ellipsis-truncate.
|
|
6
|
+
*/
|
|
7
|
+
import { wrapPlainString } from "../../tui/text-format.js";
|
|
8
|
+
/**
|
|
9
|
+
* Columns reserved for the YOU badge + gap + box padding/border.
|
|
10
|
+
* " YOU " (5) + gap (1) + horizontal padding (2) + border (2) ≈ 10.
|
|
11
|
+
*/
|
|
12
|
+
export const USER_MESSAGE_CHROME_COLS = 10;
|
|
13
|
+
/**
|
|
14
|
+
* Soft-wrap a user prompt to the chat-pane width (plan split already subtracted).
|
|
15
|
+
* Never ellipsis-truncates — every character lands on some line.
|
|
16
|
+
*/
|
|
17
|
+
export function wrapUserPrompt(text, contentWidth) {
|
|
18
|
+
const wrapWidth = Math.max(12, contentWidth - USER_MESSAGE_CHROME_COLS);
|
|
19
|
+
return wrapPlainString(text, wrapWidth).map((line) => line.lineText);
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=user-message-wrap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-message-wrap.js","sourceRoot":"","sources":["../../../src/tui-v2/rendering/user-message-wrap.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,EAAE,CAAC;AAE3C;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY,EAAE,YAAoB;IAC/D,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,YAAY,GAAG,wBAAwB,CAAC,CAAC;IACxE,OAAO,eAAe,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACvE,CAAC"}
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* AUTO-GENERATED by scripts/sync-version.mjs — do not edit by hand.
|
|
3
3
|
* Source of truth: package.json "version".
|
|
4
4
|
*/
|
|
5
|
-
export declare const VERSION: "3.8.
|
|
6
|
-
export declare const VERSION_TAG: "v3.8.
|
|
5
|
+
export declare const VERSION: "3.8.28";
|
|
6
|
+
export declare const VERSION_TAG: "v3.8.28";
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
* AUTO-GENERATED by scripts/sync-version.mjs — do not edit by hand.
|
|
3
3
|
* Source of truth: package.json "version".
|
|
4
4
|
*/
|
|
5
|
-
export const VERSION = "3.8.
|
|
6
|
-
export const VERSION_TAG = "v3.8.
|
|
5
|
+
export const VERSION = "3.8.28";
|
|
6
|
+
export const VERSION_TAG = "v3.8.28";
|
|
7
7
|
//# sourceMappingURL=version.generated.js.map
|
package/package.json
CHANGED