scream-code 0.13.3 → 0.13.5
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/README.md +107 -387
- package/dist/{app-DFhvkeiL.mjs → app-D0fX3NI6.mjs} +106 -11
- package/dist/{dispatch-C7WVQ8OE.mjs → dispatch-BpgfQJj-.mjs} +1 -1
- package/dist/{dispatch-sa_KwTpz.mjs → dispatch-By74xa3A.mjs} +1521 -113
- package/dist/main.mjs +1 -1
- package/dist/public/assets/{index-DXbFhUFY.css → index-CNfl6ZCL.css} +1 -1
- package/dist/public/assets/index-D4xKtk0T.js +90 -0
- package/dist/public/assets/index-D4xKtk0T.js.map +1 -0
- package/dist/public/index.html +16 -2
- package/dist/{text-input-dialog-Dfg978Sj.mjs → text-input-dialog-CYs9xQZi.mjs} +1 -1
- package/dist/{text-input-dialog-Cwnq9vFO.mjs → text-input-dialog-ClcJf9pu.mjs} +8 -0
- package/package.json +2 -2
- package/dist/public/assets/index-Ct3-d8xR.js +0 -90
- package/dist/public/assets/index-Ct3-d8xR.js.map +0 -1
|
@@ -4,8 +4,8 @@ import { dirname as __cjsShimDirname } from 'node:path';
|
|
|
4
4
|
const __filename = __cjsShimFileURLToPath(import.meta.url);
|
|
5
5
|
const __dirname = __cjsShimDirname(__filename);
|
|
6
6
|
import "./suppress-sqlite-warning-C2VB0doZ.mjs";
|
|
7
|
-
import { $ as toTerminalHyperlink, $t as
|
|
8
|
-
import { a as setLocale, o as t } from "./text-input-dialog-
|
|
7
|
+
import { $ as toTerminalHyperlink, $t as parseStreamingArgs, A as highlightLines, An as CLI_USER_AGENT_PRODUCT, At as ENABLE_TERMINAL_THEME_REPORTING, B as AssistantMessageComponent, Bn as log, Bt as isBusy, C as UserMessageComponent, Cn as detectShellEnvironment, Ct as contrastTextHex, D as ToolCallComponent, Dn as detectInstallSource, Dt as DISABLE_TERMINAL_FOCUS_REPORTING, E as toggleEmptySessionHint, En as getLogDir, Et as parseOsc11BackgroundTheme, F as getSharedSpeedTracker, Fn as ScreamHarness, Ft as QUERY_TERMINAL_THEME, G as resetBreathingClock, Gn as SCREAM_ERROR_INFO, H as WelcomeComponent, Hn as isScreamError, Ht as FooterComponent, I as SkillActivationComponent, It as TERMINAL_FOCUS_IN, Jt as STATUS_BULLET, K as clearGoalState, L as ReadGroupComponent, Ln as resolveScreamHome, Lt as TERMINAL_FOCUS_OUT, M as CachedContainer, Mn as DEFAULT_CATALOG_URL, Mt as OSC11_RESPONSE, N as ThinkingComponent, Nn as fetchCatalog, Nt as OSC11_RESPONSE_PREFIX, O as renderDiffLines, On as CLI_COMMAND_NAME, Ot as DISABLE_TERMINAL_THEME_REPORTING, P as estimateTokens, Pn as saveCatalogCache, Pt as OSC11_RESPONSE_PREFIX_NO_ESC, Qt as isTodoItemShape, R as parseReadGroupOutput, Rn as MemoryMemoStore, Rt as TERMINAL_THEME_DARK, Sn as saveTuiConfig, St as createThemeStyles, T as isTurnElapsedEnabled, Tn as getInputHistoryFile, Tt as detectTerminalTheme, U as BREATHE_CYCLE_MS, Un as isOrphanedToolCallError, V as AgentGroupComponent, Vn as resolveGlobalLogPath, Vt as isStreaming, W as getBreathingFrame, Wn as ErrorCodes, Xt as argsRecord, Yt as appendStreamingArgsPreview, Zt as formatErrorMessage, _ as readUpdateCache, _n as PIXEL_PULSE_FRAMES, an as MAIN_AGENT_ID, at as handleFusionPlanCommand, bn as TuiLikePreferencesSchema, bt as createEditorTheme, c as isPlanExpandable, cn as getCtrlCHint, dn as getNoActiveSessionMessage, en as serializeToolResultOutput, et as changeThinkingLevel, fn as buildSkillSlashCommands, g as refreshUpdateCache, gn as setExperimentalFlags, gt as clearInfoPanelState, h as selectUpdateTarget, hn as isExperimentalFlagEnabled, ht as supportsBalance, i as buildRoleAdditionalText, in as EXIT_CONFIRM_WINDOW_MS, j as langFromPath, jn as PRODUCT_NAME, jt as OSC11_QUERY, k as renderDiffLinesClustered, kn as CLI_UI_MODE, kt as ENABLE_TERMINAL_FOCUS_REPORTING, l as MoonLoader, ln as getCtrlDHint, mn as sortSlashCommands, mt as refreshProviderBalance, n as clearEvalPanelState, nn as truncateErrorMessage, o as disposeChildren, on as SESSION_TIPS, pn as BUILTIN_SLASH_COMMANDS, q as refineGoal, qt as printableChar, r as openUrl, rn as EMPTY_SESSION_HINT_URL, s as hasDispose, sn as TIP_ROTATION_INTERVAL_MS, st as handlePlanCommand, t as dispatchInput, tn as stringValue, tt as getModelCycleLevel, u as formatMemoryMemoForInjection, un as getLlmNotSetMessage, v as appendJsonlLine, vn as PULSE_WAVE_FRAMES, w as isEmptySessionHintDismissed, wn as getDataDir, wt as getColorPalette, x as getDaemonInstructions, xn as loadTuiConfig, xt as createMarkdownTheme, y as readJsonlFile, yn as TuiConfigParseError, yt as resolveThemeSync, z as BackgroundAgentStatusComponent, zn as flushDiagnosticLogs, zt as TERMINAL_THEME_LIGHT } from "./dispatch-By74xa3A.mjs";
|
|
8
|
+
import { a as setLocale, o as t } from "./text-input-dialog-ClcJf9pu.mjs";
|
|
9
9
|
import { createRequire } from "node:module";
|
|
10
10
|
import { randomUUID } from "node:crypto";
|
|
11
11
|
import { access, mkdir, mkdtemp, readFile, readdir, realpath, rm, unlink, writeFile } from "node:fs/promises";
|
|
@@ -30,7 +30,7 @@ function optionalBuildString(value) {
|
|
|
30
30
|
return typeof value === "string" && value.length > 0 ? value : void 0;
|
|
31
31
|
}
|
|
32
32
|
const SCREAM_BUILD_INFO = {
|
|
33
|
-
version: optionalBuildString("0.13.
|
|
33
|
+
version: optionalBuildString("0.13.5"),
|
|
34
34
|
channel: optionalBuildString(""),
|
|
35
35
|
commit: optionalBuildString(""),
|
|
36
36
|
buildTarget: optionalBuildString("darwin-arm64")
|
|
@@ -7704,6 +7704,91 @@ const INITIAL_LIVE_PANE = {
|
|
|
7704
7704
|
pendingQuestion: null
|
|
7705
7705
|
};
|
|
7706
7706
|
//#endregion
|
|
7707
|
+
//#region src/utils/clipboard/clipboard-text.ts
|
|
7708
|
+
/**
|
|
7709
|
+
* Write plain text to the system clipboard with platform-specific commands.
|
|
7710
|
+
*
|
|
7711
|
+
* scream-core's clipboard layer is read-only (clipboard-native / clipboard-image),
|
|
7712
|
+
* so the TUI's "copy selected text" needs its own writer. Used to back the
|
|
7713
|
+
* pi-tui `copySelection` hook — return true/false so the TUI can flash
|
|
7714
|
+
* "Copied!" or "Copy failed".
|
|
7715
|
+
*
|
|
7716
|
+
* Platform mapping:
|
|
7717
|
+
* macOS -> pbcopy
|
|
7718
|
+
* Windows-> powershell Set-Clipboard (base64 payload, avoids quoting issues)
|
|
7719
|
+
* Linux -> wl-copy (Wayland) / xclip -selection clipboard -i (X11)
|
|
7720
|
+
*/
|
|
7721
|
+
var ClipboardTextError = class extends Error {
|
|
7722
|
+
constructor(message) {
|
|
7723
|
+
super(message);
|
|
7724
|
+
this.name = "ClipboardTextError";
|
|
7725
|
+
}
|
|
7726
|
+
};
|
|
7727
|
+
const defaultRunCommand = (command, args, input) => {
|
|
7728
|
+
const result = spawnSync(command, args, {
|
|
7729
|
+
input,
|
|
7730
|
+
encoding: "utf8",
|
|
7731
|
+
timeout: 3e3
|
|
7732
|
+
});
|
|
7733
|
+
if (result.status === 0) return { ok: true };
|
|
7734
|
+
return {
|
|
7735
|
+
ok: false,
|
|
7736
|
+
error: result.error?.message ?? result.stderr?.toString() ?? `exit ${result.status}`
|
|
7737
|
+
};
|
|
7738
|
+
};
|
|
7739
|
+
function detectPlatform() {
|
|
7740
|
+
if (process.platform === "darwin") return "macos";
|
|
7741
|
+
if (process.platform === "win32") return "windows";
|
|
7742
|
+
if (process.platform === "linux") return process.env["WAYLAND_DISPLAY"] ? "linux-wayland" : "linux-x11";
|
|
7743
|
+
return "unsupported";
|
|
7744
|
+
}
|
|
7745
|
+
/**
|
|
7746
|
+
* Write `text` to the system clipboard. Throws ClipboardTextError when the
|
|
7747
|
+
* platform is unsupported or the underlying command fails, so callers can
|
|
7748
|
+
* surface a "Copy failed" indicator.
|
|
7749
|
+
*/
|
|
7750
|
+
async function writeTextClipboard(text, runCommand = defaultRunCommand) {
|
|
7751
|
+
const platform = detectPlatform();
|
|
7752
|
+
let command;
|
|
7753
|
+
let args;
|
|
7754
|
+
let input;
|
|
7755
|
+
switch (platform) {
|
|
7756
|
+
case "macos":
|
|
7757
|
+
command = "pbcopy";
|
|
7758
|
+
args = [];
|
|
7759
|
+
input = text;
|
|
7760
|
+
break;
|
|
7761
|
+
case "windows": {
|
|
7762
|
+
const base64 = Buffer.from(text, "utf8").toString("base64");
|
|
7763
|
+
command = "powershell";
|
|
7764
|
+
args = [
|
|
7765
|
+
"-NoProfile",
|
|
7766
|
+
"-Command",
|
|
7767
|
+
`[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String('${base64}')) | Set-Clipboard`
|
|
7768
|
+
];
|
|
7769
|
+
input = "";
|
|
7770
|
+
break;
|
|
7771
|
+
}
|
|
7772
|
+
case "linux-wayland":
|
|
7773
|
+
command = "wl-copy";
|
|
7774
|
+
args = [];
|
|
7775
|
+
input = text;
|
|
7776
|
+
break;
|
|
7777
|
+
case "linux-x11":
|
|
7778
|
+
command = "xclip";
|
|
7779
|
+
args = [
|
|
7780
|
+
"-selection",
|
|
7781
|
+
"clipboard",
|
|
7782
|
+
"-i"
|
|
7783
|
+
];
|
|
7784
|
+
input = text;
|
|
7785
|
+
break;
|
|
7786
|
+
default: throw new ClipboardTextError(`unsupported clipboard platform: ${process.platform}`);
|
|
7787
|
+
}
|
|
7788
|
+
const result = runCommand(command, args, input);
|
|
7789
|
+
if (!result.ok) throw new ClipboardTextError(`failed to copy to clipboard: ${command} ${result.error ?? "unknown error"}`);
|
|
7790
|
+
}
|
|
7791
|
+
//#endregion
|
|
7707
7792
|
//#region src/tui/utils/render-batcher.ts
|
|
7708
7793
|
function createRenderBatcher(doRender) {
|
|
7709
7794
|
let scheduled = false;
|
|
@@ -8566,7 +8651,14 @@ function createTUIState(options) {
|
|
|
8566
8651
|
const initialAppState = options.initialAppState;
|
|
8567
8652
|
const theme = createScreamTUIThemeBundle(initialAppState.theme, options.resolvedTheme);
|
|
8568
8653
|
const terminal = new ProcessTerminal();
|
|
8569
|
-
const ui = new TuiAltScreen(terminal)
|
|
8654
|
+
const ui = new TuiAltScreen(terminal, void 0, void 0, { copySelection: async (text) => {
|
|
8655
|
+
try {
|
|
8656
|
+
await writeTextClipboard(text);
|
|
8657
|
+
return true;
|
|
8658
|
+
} catch {
|
|
8659
|
+
return false;
|
|
8660
|
+
}
|
|
8661
|
+
} });
|
|
8570
8662
|
const uiAny = ui;
|
|
8571
8663
|
const originalDoRender = uiAny["doRender"].bind(ui);
|
|
8572
8664
|
let recovering = false;
|
|
@@ -9207,6 +9299,7 @@ var SessionManager$1 = class {
|
|
|
9207
9299
|
contextTokens: status.contextTokens,
|
|
9208
9300
|
maxContextTokens: status.maxContextTokens,
|
|
9209
9301
|
contextUsage: status.contextUsage,
|
|
9302
|
+
...status.usage?.turnTotal !== void 0 ? { sessionUsage: status.usage.turnTotal } : {},
|
|
9210
9303
|
sessionTitle: session.summary?.title ?? null,
|
|
9211
9304
|
goal: goal ? {
|
|
9212
9305
|
objective: goal.objective,
|
|
@@ -11948,12 +12041,14 @@ var ScreamTUI = class {
|
|
|
11948
12041
|
Object.assign(this.state.appState, patch);
|
|
11949
12042
|
const planModeChanged = "planMode" in patch && prevPlanMode !== this.state.appState.planMode;
|
|
11950
12043
|
const sessionChanged = "sessionId" in patch && this.state.appState.sessionId !== prevSessionId;
|
|
11951
|
-
if (sessionChanged)
|
|
11952
|
-
|
|
11953
|
-
|
|
11954
|
-
|
|
11955
|
-
|
|
11956
|
-
|
|
12044
|
+
if (sessionChanged) {
|
|
12045
|
+
if (!("sessionUsage" in patch)) this.state.appState.sessionUsage = {
|
|
12046
|
+
inputOther: 0,
|
|
12047
|
+
output: 0,
|
|
12048
|
+
inputCacheRead: 0,
|
|
12049
|
+
inputCacheCreation: 0
|
|
12050
|
+
};
|
|
12051
|
+
}
|
|
11957
12052
|
if (planModeChanged || sessionChanged) {
|
|
11958
12053
|
this.updateEditorBorderHighlight();
|
|
11959
12054
|
this.state.planModeBanner.setPlanMode(this.state.appState.planMode ?? "off");
|
|
@@ -12055,7 +12150,7 @@ var ScreamTUI = class {
|
|
|
12055
12150
|
const card = new OnboardingCardComponent({
|
|
12056
12151
|
colors: this.state.theme.colors,
|
|
12057
12152
|
onConfigure: () => {
|
|
12058
|
-
import("./dispatch-
|
|
12153
|
+
import("./dispatch-BpgfQJj-.mjs").then(({ handleConnectCommand }) => handleConnectCommand(this, "")).finally(() => {
|
|
12059
12154
|
this.restoreEditor();
|
|
12060
12155
|
});
|
|
12061
12156
|
},
|
|
@@ -3,5 +3,5 @@ import { fileURLToPath as __cjsShimFileURLToPath } from 'node:url';
|
|
|
3
3
|
import { dirname as __cjsShimDirname } from 'node:path';
|
|
4
4
|
const __filename = __cjsShimFileURLToPath(import.meta.url);
|
|
5
5
|
const __dirname = __cjsShimDirname(__filename);
|
|
6
|
-
import {
|
|
6
|
+
import { Gt as handleConnectCommand } from "./dispatch-By74xa3A.mjs";
|
|
7
7
|
export { handleConnectCommand };
|