skydive-cli 0.4.1-beta.3 → 0.4.1-beta.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/dist/js/bin.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { C as ensureActiveOrganization, D as setActiveWorkspace, E as listWorkspaces, O as name, T as getSessionIdentity, a as installCrashHandler, k as version, t as maybeStartProfiling, u as brandHelpArt, w as getActiveWorkspaceId, x as themes } from "./profiler-
|
|
2
|
+
import { C as ensureActiveOrganization, D as setActiveWorkspace, E as listWorkspaces, O as name, T as getSessionIdentity, a as installCrashHandler, k as version, t as maybeStartProfiling, u as brandHelpArt, w as getActiveWorkspaceId, x as themes } from "./profiler-BoEx7ARj.mjs";
|
|
3
3
|
import { A as getStoredApiKeyWorkspaceName, C as getLastSeenVersion, F as resolveManagementAuth, I as resolveSession, M as resolveAppUrl, N as resolveChatAuth, O as getShareMachineDefault, P as resolveConfig, R as saveConfig, S as getConfigPath, T as getPromptHistoryPath, V as setLastSeenVersion, _ as API_KEY_PREFIX, b as PREFERENCES, g as API_KEY_FAMILY_PREFIX, h as API_KEYS_URL, i as resolveAgent, j as getUpdateCheckDisabled, k as getStoredApiKeyId, v as DEFAULT_API_URL, w as getPreference, x as deleteConfig, z as saveSession } from "./print-CbayCa87.mjs";
|
|
4
4
|
import { n as printError, r as printTable, t as output } from "./output-DYzzdXYV.mjs";
|
|
5
5
|
import { t as HttpError } from "./http-error-DzyrsLAZ.mjs";
|
|
@@ -1472,12 +1472,12 @@ function buildImportSeedPrompt(projectDir) {
|
|
|
1472
1472
|
return [
|
|
1473
1473
|
"I'm migrating from another coding agent. Import my setup from this machine.",
|
|
1474
1474
|
"",
|
|
1475
|
-
`Use your import-config skill. I ran this from \`${projectDir}\`, so start there
|
|
1475
|
+
`Use your import-config skill. I ran this from \`${projectDir}\`, so start there and in my home directory. Don't assume one tool — do the discovery sweep so you catch whatever I actually use (Claude Code, Cursor, Codex, Gemini CLI, Copilot, Windsurf, Cline, OpenCode, Aider, and any nested AGENTS.md). Show me the plan first: everything you found, what you'll bring over, where it lands in you, and anything you're leaving out (credentials especially). Then wait for my OK before committing anything.`
|
|
1476
1476
|
].join("\n");
|
|
1477
1477
|
}
|
|
1478
1478
|
const importCommand = {
|
|
1479
1479
|
command: "import",
|
|
1480
|
-
describe: "Import your Claude Code
|
|
1480
|
+
describe: "Import your existing coding-agent setup (Claude Code, Cursor, Codex, Gemini, Copilot, and more) into an agent (opens a machine-shared chat)",
|
|
1481
1481
|
builder: (y) => y.option("agent", {
|
|
1482
1482
|
type: "string",
|
|
1483
1483
|
describe: "Target agent, by id, slug, or name. Optional: with one agent on the account it is auto-picked; otherwise the agent picker opens first (interactive) or resolution follows the -p rules."
|
|
@@ -1516,7 +1516,7 @@ const importCommand = {
|
|
|
1516
1516
|
process.exit(1);
|
|
1517
1517
|
}
|
|
1518
1518
|
}
|
|
1519
|
-
const { runChat } = await import("./boot-
|
|
1519
|
+
const { runChat } = await import("./boot-BMxgenOa.mjs");
|
|
1520
1520
|
await runChat({
|
|
1521
1521
|
appUrl,
|
|
1522
1522
|
sessionToken: session.value.sessionToken,
|
|
@@ -1928,7 +1928,7 @@ const chatCommand = {
|
|
|
1928
1928
|
sessionToken: auth.value.token,
|
|
1929
1929
|
agentSelector: argv.agent ?? null
|
|
1930
1930
|
});
|
|
1931
|
-
const { runChat } = await import("./boot-
|
|
1931
|
+
const { runChat } = await import("./boot-BMxgenOa.mjs");
|
|
1932
1932
|
await runChat({
|
|
1933
1933
|
appUrl: auth.value.appUrl,
|
|
1934
1934
|
sessionToken: auth.value.token,
|
|
@@ -2287,7 +2287,7 @@ const switchCommand = {
|
|
|
2287
2287
|
printError("The workspace picker needs the Bun runtime and it could not be set up automatically. Pass a workspace slug instead, or install Bun and retry.");
|
|
2288
2288
|
process.exit(1);
|
|
2289
2289
|
}
|
|
2290
|
-
const { runWorkspacePicker } = await import("./boot-
|
|
2290
|
+
const { runWorkspacePicker } = await import("./boot-BMxgenOa.mjs");
|
|
2291
2291
|
await runWorkspacePicker(session);
|
|
2292
2292
|
return;
|
|
2293
2293
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { D as setActiveWorkspace, E as listWorkspaces, S as themesForMode, _ as themeForMode, a as installCrashHandler, b as themeVersion, c as MARK_CELLS, d as DEFAULT_THEME_ID, f as applyTheme, g as theme, h as noColorRequested, i as writeArtifact, l as WORDMARK, m as monoTheme, n as profilingEnabled, o as buildCrashReport, p as findTheme, r as record, s as writeCrashReport, v as themeMode, w as getActiveWorkspaceId, y as themeModeFromColorFgBg } from "./profiler-
|
|
2
|
+
import { D as setActiveWorkspace, E as listWorkspaces, S as themesForMode, _ as themeForMode, a as installCrashHandler, b as themeVersion, c as MARK_CELLS, d as DEFAULT_THEME_ID, f as applyTheme, g as theme, h as noColorRequested, i as writeArtifact, l as WORDMARK, m as monoTheme, n as profilingEnabled, o as buildCrashReport, p as findTheme, r as record, s as writeCrashReport, v as themeMode, w as getActiveWorkspaceId, y as themeModeFromColorFgBg } from "./profiler-BoEx7ARj.mjs";
|
|
3
3
|
import { B as saveTheme, D as getSavedTheme, E as getReviewStateDir, L as resolveWebUrl, S as getConfigPath, c as cardActionErrorMessage, d as reconcileMaskedInput, f as resolveConnectUrl, i as resolveAgent, l as parseExternalOauthConnectParams, m as specKeyFor, p as parseConnectCard, s as MASK_CHAR, u as parseOauthConnectParams, v as DEFAULT_API_URL, y as DEFAULT_APP_URL } from "./print-CbayCa87.mjs";
|
|
4
4
|
import { t as HttpError } from "./http-error-DzyrsLAZ.mjs";
|
|
5
5
|
import { a as isRecord, i as errorMessage, n as errorDetail, r as sendErrorMessage, t as createRestClient } from "./rest-BY2nADw5.mjs";
|
|
@@ -6877,6 +6877,66 @@ function filterSlashCommands(query) {
|
|
|
6877
6877
|
return [...prefix, ...substring];
|
|
6878
6878
|
}
|
|
6879
6879
|
|
|
6880
|
+
//#endregion
|
|
6881
|
+
//#region src/chat/tui/hard-exit.ts
|
|
6882
|
+
/**
|
|
6883
|
+
* Leaving the chat has to work even when the renderer cannot finish its own
|
|
6884
|
+
* teardown.
|
|
6885
|
+
*
|
|
6886
|
+
* `destroy()` restores the terminal from inside the render loop: when a frame
|
|
6887
|
+
* is in flight it defers the restore to the loop's `finally` and returns
|
|
6888
|
+
* immediately. That is fine while the loop is turning. When the loop has
|
|
6889
|
+
* stopped producing frames, the deferred half never runs — the process keeps
|
|
6890
|
+
* running with the alternate screen up, the cursor hidden and stdin in raw
|
|
6891
|
+
* mode, so the pane looks frozen and quitting appears to do nothing.
|
|
6892
|
+
*
|
|
6893
|
+
* So teardown checks whether the renderer actually finished. If it did not,
|
|
6894
|
+
* we emit the same terminal reset ourselves and end the process rather than
|
|
6895
|
+
* waiting on an event loop that is no longer draining.
|
|
6896
|
+
*/
|
|
6897
|
+
/**
|
|
6898
|
+
* The reset the renderer writes when it completes teardown: show the cursor,
|
|
6899
|
+
* stop every mouse reporting mode, pop the kitty keyboard stack, leave the
|
|
6900
|
+
* alternate screen, clear attributes. Emitting it twice is harmless, which is
|
|
6901
|
+
* what makes it safe as a fallback.
|
|
6902
|
+
*/
|
|
6903
|
+
const TERMINAL_RESTORE = [
|
|
6904
|
+
"\x1B[?25h",
|
|
6905
|
+
"\x1B[?1000l",
|
|
6906
|
+
"\x1B[?1002l",
|
|
6907
|
+
"\x1B[?1003l",
|
|
6908
|
+
"\x1B[?1006l",
|
|
6909
|
+
"\x1B[?1015l",
|
|
6910
|
+
"\x1B[<u",
|
|
6911
|
+
"\x1B[?1049l",
|
|
6912
|
+
"\x1B[0m"
|
|
6913
|
+
].join("");
|
|
6914
|
+
/**
|
|
6915
|
+
* Tear down the renderer and leave the chat, guaranteeing both a usable
|
|
6916
|
+
* terminal and an ended process.
|
|
6917
|
+
*
|
|
6918
|
+
* A renderer that tore itself down keeps the existing behavior: the process
|
|
6919
|
+
* ends once the event loop drains, so nothing in flight is cut short. Only an
|
|
6920
|
+
* unfinished teardown takes the forced path.
|
|
6921
|
+
*/
|
|
6922
|
+
function exitChat({ renderer, afterTeardown, write = (text) => void process.stdout.write(text), setRawMode = (raw) => process.stdin.setRawMode?.(raw), exit = (code) => process.exit(code) }) {
|
|
6923
|
+
let destroyThrew = false;
|
|
6924
|
+
try {
|
|
6925
|
+
renderer.destroy();
|
|
6926
|
+
} catch {
|
|
6927
|
+
destroyThrew = true;
|
|
6928
|
+
}
|
|
6929
|
+
const finished = !destroyThrew && renderer.isDestroyed;
|
|
6930
|
+
if (!finished) {
|
|
6931
|
+
try {
|
|
6932
|
+
setRawMode(false);
|
|
6933
|
+
} catch {}
|
|
6934
|
+
write(TERMINAL_RESTORE);
|
|
6935
|
+
}
|
|
6936
|
+
afterTeardown?.();
|
|
6937
|
+
if (!finished) exit(0);
|
|
6938
|
+
}
|
|
6939
|
+
|
|
6880
6940
|
//#endregion
|
|
6881
6941
|
//#region src/chat/tui/resume-hint.ts
|
|
6882
6942
|
/**
|
|
@@ -10859,8 +10919,10 @@ function ChatScreen({ agent, conversation }) {
|
|
|
10859
10919
|
const quit = useCallback(() => {
|
|
10860
10920
|
portalClient?.dispose();
|
|
10861
10921
|
agentHost.dispose();
|
|
10862
|
-
|
|
10863
|
-
|
|
10922
|
+
exitChat({
|
|
10923
|
+
renderer,
|
|
10924
|
+
afterTeardown: printResumeHint
|
|
10925
|
+
});
|
|
10864
10926
|
}, [
|
|
10865
10927
|
portalClient,
|
|
10866
10928
|
agentHost,
|
|
@@ -12398,8 +12460,10 @@ function App({ appUrl, sessionToken, authKind, shareMachine, promptHistoryPath,
|
|
|
12398
12460
|
if (key.name === "c" && key.ctrl && screen.kind !== "chat") {
|
|
12399
12461
|
useStore.getState().portalClient?.dispose();
|
|
12400
12462
|
agentHost.dispose();
|
|
12401
|
-
|
|
12402
|
-
|
|
12463
|
+
exitChat({
|
|
12464
|
+
renderer,
|
|
12465
|
+
afterTeardown: printResumeHint
|
|
12466
|
+
});
|
|
12403
12467
|
}
|
|
12404
12468
|
});
|
|
12405
12469
|
return /* @__PURE__ */ jsx(AgentHostContext.Provider, {
|