scream-code 0.18.6 → 0.18.7
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/{app-Ca2pwAk7.mjs → app-IU7G9gs0.mjs} +52 -17
- package/dist/{dispatch-BgO7wAf9.mjs → dispatch-7Mas_Tvb.mjs} +132 -114
- package/dist/{dispatch-0mihbsV3.mjs → dispatch-BqBnrIMj.mjs} +1 -1
- package/dist/main.mjs +1 -1
- package/dist/{src-C3oCiVNb.mjs → src-CFHysu0q.mjs} +11 -11
- package/dist/{src-C7C9e5Ds.mjs → src-CQwXASmd.mjs} +3096 -14
- package/dist/{src-qit_jRUM.mjs → src-ChTWl9Cn.mjs} +1 -1
- package/dist/{text-input-dialog-DWepgNF4.mjs → text-input-dialog-D7dm6kak.mjs} +1 -1
- package/dist/{text-input-dialog-BvbqjvzB.mjs → text-input-dialog-gDr3i7xz.mjs} +2 -0
- package/package.json +1 -1
|
@@ -4,9 +4,9 @@ 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 { A as sharedMemoStore } from "./src-
|
|
8
|
-
import { $ as refineGoal, $n as ScreamHarness, $t as FooterComponent, A as renderDiffLinesClustered, An as setExperimentalFlags, At as isEmptySessionHintDismissed, B as AssistantMessageComponent, Bn as saveTuiConfig, Bt as ENABLE_TERMINAL_FOCUS_REPORTING, C as readJsonlFile, Cn as getCtrlDHint, Ct as supportsBalance, D as UserMessageComponent, Dn as BUILTIN_SLASH_COMMANDS, Dt as resolveThemeSync, En as buildSkillSlashCommands, F as NoticeMessageComponent, Fn as PIXEL_PULSE_FRAMES, Ft as getColorPalette, G as BackgroundAgentStatusComponent, Gn as detectInstallSource, Gt as OSC11_RESPONSE_PREFIX_NO_ESC, H as charsForTokenBudget, Hn as getDataDir, Ht as OSC11_QUERY, I as StatusMessageComponent, In as PULSE_WAVE_FRAMES, It as detectTerminalTheme, J as BREATHE_CYCLE_MS, Jn as CLI_USER_AGENT_PRODUCT, Jt as TERMINAL_FOCUS_OUT, K as AgentGroupComponent, Kn as CLI_COMMAND_NAME, Kt as QUERY_TERMINAL_THEME, L as replaceTabs, Ln as TuiConfigParseError, Lt as parseOsc11BackgroundTheme, M as langFromPath, Mn as getKnowledgeStore, Mt as toggleEmptySessionHint, N as CachedContainer, Nn as hasEmbeddingModelCache, Nt as createThemeStyles, O as ToolCallComponent, On as sortSlashCommands, Ot as createEditorTheme, P as ThinkingComponent, Pn as startManualEmbeddingDownload, Pt as contrastTextHex, Q as clearGoalState, Qn as saveCatalogCache, Qt as isStreaming, R as sanitizeShellOutput, Rn as TuiLikePreferencesSchema, Rt as DISABLE_TERMINAL_FOCUS_REPORTING, S as appendJsonlLine, Sn as getCtrlCHint, St as refreshProviderBalance, T as getDaemonInstructions, Tn as getNoActiveSessionMessage, U as estimateTokens, Un as getInputHistoryFile, Ut as OSC11_RESPONSE, V as ActivityGroupComponent, Vn as detectShellEnvironment, Vt as ENABLE_TERMINAL_THEME_REPORTING, W as getSharedSpeedTracker, Wn as getLogDir, Wt as OSC11_RESPONSE_PREFIX, X as resetBreathingClock, Xn as DEFAULT_CATALOG_URL, Xt as TERMINAL_THEME_LIGHT, Y as getBreathingFrame, Yn as PRODUCT_NAME, Yt as TERMINAL_THEME_DARK, Z as CompactionComponent, Zn as fetchCatalog, Zt as isBusy,
|
|
9
|
-
import { i as t, n as getLocale, r as setLocale } from "./text-input-dialog-
|
|
7
|
+
import { A as sharedMemoStore } from "./src-CQwXASmd.mjs";
|
|
8
|
+
import { $ as refineGoal, $n as ScreamHarness, $t as FooterComponent, A as renderDiffLinesClustered, An as setExperimentalFlags, At as isEmptySessionHintDismissed, B as AssistantMessageComponent, Bn as saveTuiConfig, Bt as ENABLE_TERMINAL_FOCUS_REPORTING, C as readJsonlFile, Cn as getCtrlDHint, Ct as supportsBalance, D as UserMessageComponent, Dn as BUILTIN_SLASH_COMMANDS, Dt as resolveThemeSync, En as buildSkillSlashCommands, F as NoticeMessageComponent, Fn as PIXEL_PULSE_FRAMES, Ft as getColorPalette, G as BackgroundAgentStatusComponent, Gn as detectInstallSource, Gt as OSC11_RESPONSE_PREFIX_NO_ESC, H as charsForTokenBudget, Hn as getDataDir, Ht as OSC11_QUERY, I as StatusMessageComponent, In as PULSE_WAVE_FRAMES, It as detectTerminalTheme, J as BREATHE_CYCLE_MS, Jn as CLI_USER_AGENT_PRODUCT, Jt as TERMINAL_FOCUS_OUT, K as AgentGroupComponent, Kn as CLI_COMMAND_NAME, Kt as QUERY_TERMINAL_THEME, L as replaceTabs, Ln as TuiConfigParseError, Lt as parseOsc11BackgroundTheme, M as langFromPath, Mn as getKnowledgeStore, Mt as toggleEmptySessionHint, N as CachedContainer, Nn as hasEmbeddingModelCache, Nt as createThemeStyles, O as ToolCallComponent, On as sortSlashCommands, Ot as createEditorTheme, P as ThinkingComponent, Pn as startManualEmbeddingDownload, Pt as contrastTextHex, Q as clearGoalState, Qn as saveCatalogCache, Qt as isStreaming, R as sanitizeShellOutput, Rn as TuiLikePreferencesSchema, Rt as DISABLE_TERMINAL_FOCUS_REPORTING, S as appendJsonlLine, Sn as getCtrlCHint, St as refreshProviderBalance, T as getDaemonInstructions, Tn as getNoActiveSessionMessage, U as estimateTokens, Un as getInputHistoryFile, Ut as OSC11_RESPONSE, V as ActivityGroupComponent, Vn as detectShellEnvironment, Vt as ENABLE_TERMINAL_THEME_REPORTING, W as getSharedSpeedTracker, Wn as getLogDir, Wt as OSC11_RESPONSE_PREFIX, X as resetBreathingClock, Xn as DEFAULT_CATALOG_URL, Xt as TERMINAL_THEME_LIGHT, Y as getBreathingFrame, Yn as PRODUCT_NAME, Yt as TERMINAL_THEME_DARK, Z as CompactionComponent, Zn as fetchCatalog, Zt as isBusy, a as buildRoleAdditionalText, at as isInternalMessage, b as refreshUpdateCache, bn as SESSION_TIPS, cn as appendSessionHeaderHint, cr as resolveScreamHome, ct as getModelCycleLevel, d as isExpandable, dn as formatErrorMessage, dr as resolveGlobalLogPath, en as lerpGradient, er as encodeWorkDirKey, f as isPlanExpandable, fn as isTodoItemShape, fr as isScreamError, gn as truncateErrorMessage, hn as stringValue, hr as SCREAM_ERROR_INFO, ht as handlePlanCommand, i as openUrl, ir as removeSessionIndexEntry, j as highlightLines, jn as embeddingFailureDetail, jt as isTurnElapsedEnabled, k as renderDiffLines, kn as isExperimentalFlagEnabled, kt as createMarkdownTheme, l as disposeChildren, ln as appendStreamingArgsPreview, lr as flushDiagnosticLogs, m as formatMemoryMemoForInjection, mn as serializeToolResultOutput, mr as ErrorCodes, n as clearEvalPanelState, nr as appendSessionIndexEntry, o as syncDiagramCapabilityPrompt, on as printableChar, or as isRealUserPrompt, ot as toTerminalHyperlink, p as MoonLoader, pn as parseStreamingArgs, pr as isOrphanedToolCallError, pt as handleFusionPlanCommand, q as WelcomeComponent, qn as CLI_UI_MODE, qt as TERMINAL_FOCUS_IN, rr as readSessionIndex, sn as STATUS_BULLET, sr as parseRlmMaxDepthArg, st as changeThinkingLevel, t as dispatchInput, tn as SubagentSlots, tr as normalizeWorkDir, u as hasDispose, un as argsRecord, ur as log, vn as EXIT_CONFIRM_WINDOW_MS, wn as getLlmNotSetMessage, wt as clearInfoPanelState, x as readUpdateCache, xn as TIP_ROTATION_INTERVAL_MS, y as selectUpdateTarget, yn as MAIN_AGENT_ID, z as SkillActivationComponent, zn as loadTuiConfig, zt as DISABLE_TERMINAL_THEME_REPORTING } from "./dispatch-7Mas_Tvb.mjs";
|
|
9
|
+
import { i as t, n as getLocale, r as setLocale } from "./text-input-dialog-gDr3i7xz.mjs";
|
|
10
10
|
import { createRequire } from "node:module";
|
|
11
11
|
import { randomBytes, randomUUID, scryptSync, timingSafeEqual } from "node:crypto";
|
|
12
12
|
import { access, appendFile, chmod, mkdir, mkdtemp, readFile, readdir, realpath, rename, rm, stat, unlink, writeFile } from "node:fs/promises";
|
|
@@ -33,7 +33,7 @@ function optionalBuildString(value) {
|
|
|
33
33
|
return typeof value === "string" && value.length > 0 ? value : void 0;
|
|
34
34
|
}
|
|
35
35
|
const SCREAM_BUILD_INFO = {
|
|
36
|
-
version: optionalBuildString("0.18.
|
|
36
|
+
version: optionalBuildString("0.18.7"),
|
|
37
37
|
channel: optionalBuildString(""),
|
|
38
38
|
commit: optionalBuildString(""),
|
|
39
39
|
buildTarget: optionalBuildString("darwin-arm64")
|
|
@@ -1785,8 +1785,9 @@ var EditorKeyboardController = class {
|
|
|
1785
1785
|
editor.onCtrlF = () => {
|
|
1786
1786
|
if (host.state.transcriptEntries.length > 0) return false;
|
|
1787
1787
|
if (isEmptySessionHintDismissed()) return false;
|
|
1788
|
-
|
|
1789
|
-
|
|
1788
|
+
const currentTip = SESSION_TIPS[host.lifecycleController.currentTipIdx];
|
|
1789
|
+
if ((currentTip?.isAd ?? false) !== true) return false;
|
|
1790
|
+
openUrl(currentTip?.url ?? "https://github.com/LIUTod/scream-code");
|
|
1790
1791
|
return true;
|
|
1791
1792
|
};
|
|
1792
1793
|
editor.onCtrlB = () => {
|
|
@@ -7681,6 +7682,41 @@ var TranscriptController = class TranscriptController {
|
|
|
7681
7682
|
}
|
|
7682
7683
|
};
|
|
7683
7684
|
//#endregion
|
|
7685
|
+
//#region src/tui/utils/tip-hyperlink.ts
|
|
7686
|
+
/**
|
|
7687
|
+
* Composes the idle tip line shown above the editor: the raw i18n text, with
|
|
7688
|
+
* an optional clickable domain for tips that carry a `url`.
|
|
7689
|
+
*
|
|
7690
|
+
* A tip whose text mentions its bare domain inline gets that domain wrapped as
|
|
7691
|
+
* an OSC 8 hyperlink (link color + underline) so it reads as a link against
|
|
7692
|
+
* the dimmed cue text. Clicking opens through the alt-screen openUrl callback;
|
|
7693
|
+
* Ctrl+F targets the same destination for terminals without mouse reporting.
|
|
7694
|
+
* Tips without a `url`, or whose text does not mention the domain, render
|
|
7695
|
+
* unchanged (e.g. the GitHub tip is keyboard-only and has no inline URL).
|
|
7696
|
+
*/
|
|
7697
|
+
function composeTipLabel(raw, tip, linkColor) {
|
|
7698
|
+
if (tip.url === void 0) return raw;
|
|
7699
|
+
const domain = tip.url.replace(/^https?:\/\//iu, "");
|
|
7700
|
+
if (!raw.includes(domain)) return raw;
|
|
7701
|
+
const link = toTerminalHyperlink(chalk.hex(linkColor).underline(domain), tip.url);
|
|
7702
|
+
return raw.replace(domain, link);
|
|
7703
|
+
}
|
|
7704
|
+
/**
|
|
7705
|
+
* Weighted rotation pick: `OFFER_TIP_PROBABILITY` of the rolls select the
|
|
7706
|
+
* offer tip (regardless of what is currently shown — a re-pick keeps the ad
|
|
7707
|
+
* line up), everything else picks uniformly excluding the current tip.
|
|
7708
|
+
*/
|
|
7709
|
+
function pickTipIndex(tips, current) {
|
|
7710
|
+
if (tips.length <= 1) return Math.max(0, current ?? 0);
|
|
7711
|
+
const offerIndex = tips.findIndex((tip) => tip.isAd && tip.url !== void 0);
|
|
7712
|
+
if (offerIndex !== -1 && Math.random() < .8) return offerIndex;
|
|
7713
|
+
let next;
|
|
7714
|
+
do
|
|
7715
|
+
next = Math.floor(Math.random() * tips.length);
|
|
7716
|
+
while (next === current);
|
|
7717
|
+
return next;
|
|
7718
|
+
}
|
|
7719
|
+
//#endregion
|
|
7684
7720
|
//#region src/tui/components/chrome/gutter-container.ts
|
|
7685
7721
|
/**
|
|
7686
7722
|
* Container that reserves left/right gutter columns around its children,
|
|
@@ -8915,7 +8951,7 @@ var LifecycleController = class LifecycleController {
|
|
|
8915
8951
|
return usage.inputOther + usage.inputCacheRead + usage.inputCacheCreation + usage.output;
|
|
8916
8952
|
}
|
|
8917
8953
|
tipRotationTimer;
|
|
8918
|
-
currentTipIndex =
|
|
8954
|
+
currentTipIndex = pickTipIndex(SESSION_TIPS, void 0);
|
|
8919
8955
|
/** Sidebar-only git cache (the footer owns its own). Rebuilt when the
|
|
8920
8956
|
* workDir changes; `getStatus()` is TTL-cached so polling is cheap. */
|
|
8921
8957
|
sidebarGitCache;
|
|
@@ -9345,7 +9381,7 @@ var LifecycleController = class LifecycleController {
|
|
|
9345
9381
|
const tip = SESSION_TIPS[this.currentTipIndex] ?? SESSION_TIPS[0];
|
|
9346
9382
|
state.statusBarContainer.addChild(new StatusBarPaneComponent({
|
|
9347
9383
|
mode: "idle",
|
|
9348
|
-
label: t(tip.i18nKey),
|
|
9384
|
+
label: composeTipLabel(t(tip.i18nKey), tip, state.theme.colors.primary),
|
|
9349
9385
|
labelColor: "#999999"
|
|
9350
9386
|
}));
|
|
9351
9387
|
this.startTipRotation();
|
|
@@ -9354,6 +9390,9 @@ var LifecycleController = class LifecycleController {
|
|
|
9354
9390
|
}
|
|
9355
9391
|
state.ui.requestRender();
|
|
9356
9392
|
}
|
|
9393
|
+
/** The idle tip line delegates its optional domain link to composeTipLabel
|
|
9394
|
+
* (see tui/utils/tip-hyperlink.ts): linked tips render the bare domain as
|
|
9395
|
+
* a clickable OSC 8 hyperlink against the dimmed cue text. */
|
|
9357
9396
|
/** Builds the reconnect label shown next to the status-bar pulse wave
|
|
9358
9397
|
* while a step retry is in flight, e.g. "重连中 3/10 · 限流 · 20s 后重试".
|
|
9359
9398
|
* Returns an empty string when no retry is active. Static by design: the
|
|
@@ -9384,17 +9423,13 @@ var LifecycleController = class LifecycleController {
|
|
|
9384
9423
|
get currentTipIdx() {
|
|
9385
9424
|
return this.currentTipIndex;
|
|
9386
9425
|
}
|
|
9387
|
-
/** Start the
|
|
9388
|
-
*
|
|
9426
|
+
/** Start the weighted tip rotation timer: 80% of rotations land on the
|
|
9427
|
+
* offer tip (see tui/utils/tip-hyperlink.ts), the rest spread uniformly
|
|
9428
|
+
* and never repeat the line currently on screen. */
|
|
9389
9429
|
startTipRotation() {
|
|
9390
9430
|
if (this.tipRotationTimer !== void 0) return;
|
|
9391
9431
|
this.tipRotationTimer = setInterval(() => {
|
|
9392
|
-
|
|
9393
|
-
let next;
|
|
9394
|
-
do
|
|
9395
|
-
next = Math.floor(Math.random() * SESSION_TIPS.length);
|
|
9396
|
-
while (next === this.currentTipIndex);
|
|
9397
|
-
this.currentTipIndex = next;
|
|
9432
|
+
this.currentTipIndex = pickTipIndex(SESSION_TIPS, this.currentTipIndex);
|
|
9398
9433
|
this.lastActivityMode = void 0;
|
|
9399
9434
|
this.updateActivityPane();
|
|
9400
9435
|
}, TIP_ROTATION_INTERVAL_MS);
|
|
@@ -15235,7 +15270,7 @@ var ScreamTUI = class {
|
|
|
15235
15270
|
const card = new OnboardingCardComponent({
|
|
15236
15271
|
colors: this.state.theme.colors,
|
|
15237
15272
|
onConfigure: () => {
|
|
15238
|
-
import("./dispatch-
|
|
15273
|
+
import("./dispatch-BqBnrIMj.mjs").then(({ handleConnectCommand }) => handleConnectCommand(this, "")).finally(() => {
|
|
15239
15274
|
this.restoreEditor();
|
|
15240
15275
|
onDone?.();
|
|
15241
15276
|
});
|