skydive-cli 0.2.0-beta.606 → 0.2.0-beta.610
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 { A as deleteConfig, B as resolveAppUrl, C as setActiveWorkspace, D as DEFAULT_API_URL, E as API_KEY_PREFIX, G as saveConfig, H as resolveManagementAuth, I as getShareMachineDefault, J as setLastSeenVersion, K as saveSession, L as getStoredApiKeyId, M as getLastSeenVersion, N as getPromptHistoryPath, R as getStoredApiKeyWorkspaceName, S as listWorkspaces, T as API_KEY_FAMILY_PREFIX, U as resolveSession, V as resolveConfig, X as version, Y as name, _ as themes, b as getActiveWorkspaceId, j as getConfigPath, k as DEFAULT_WEB_URL, o as brandHelpArt, t as installCrashHandler, w as API_KEYS_URL, x as getSessionIdentity, y as ensureActiveOrganization, z as getUpdateCheckDisabled } from "./install-
|
|
2
|
+
import { A as deleteConfig, B as resolveAppUrl, C as setActiveWorkspace, D as DEFAULT_API_URL, E as API_KEY_PREFIX, G as saveConfig, H as resolveManagementAuth, I as getShareMachineDefault, J as setLastSeenVersion, K as saveSession, L as getStoredApiKeyId, M as getLastSeenVersion, N as getPromptHistoryPath, R as getStoredApiKeyWorkspaceName, S as listWorkspaces, T as API_KEY_FAMILY_PREFIX, U as resolveSession, V as resolveConfig, X as version, Y as name, _ as themes, b as getActiveWorkspaceId, j as getConfigPath, k as DEFAULT_WEB_URL, o as brandHelpArt, t as installCrashHandler, w as API_KEYS_URL, x as getSessionIdentity, y as ensureActiveOrganization, z as getUpdateCheckDisabled } from "./install-BDaFCeB_.mjs";
|
|
3
3
|
import { n as printError, r as printTable, t as output } from "./output-B4cW10Ph.mjs";
|
|
4
4
|
import { n as createRestClient } from "./rest-DMpigwmN.mjs";
|
|
5
5
|
import { i as resolveAgent } from "./print-6Bm51XhR.mjs";
|
|
@@ -1195,7 +1195,7 @@ const importCommand = {
|
|
|
1195
1195
|
process.exit(1);
|
|
1196
1196
|
}
|
|
1197
1197
|
}
|
|
1198
|
-
const { runChat } = await import("./boot-
|
|
1198
|
+
const { runChat } = await import("./boot-DFERQrw5.mjs");
|
|
1199
1199
|
await runChat({
|
|
1200
1200
|
appUrl,
|
|
1201
1201
|
sessionToken: session.value.sessionToken,
|
|
@@ -1511,7 +1511,7 @@ const chatCommand = {
|
|
|
1511
1511
|
printError(`Unknown theme "${themeId}". Valid themes: ${themes.map((t) => t.id).join(", ")}`);
|
|
1512
1512
|
process.exit(1);
|
|
1513
1513
|
}
|
|
1514
|
-
const { runChat } = await import("./boot-
|
|
1514
|
+
const { runChat } = await import("./boot-DFERQrw5.mjs");
|
|
1515
1515
|
await runChat({
|
|
1516
1516
|
appUrl,
|
|
1517
1517
|
sessionToken: session.value.sessionToken,
|
|
@@ -1819,7 +1819,7 @@ const switchCommand = {
|
|
|
1819
1819
|
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.");
|
|
1820
1820
|
process.exit(1);
|
|
1821
1821
|
}
|
|
1822
|
-
const { runWorkspacePicker } = await import("./boot-
|
|
1822
|
+
const { runWorkspacePicker } = await import("./boot-DFERQrw5.mjs");
|
|
1823
1823
|
await runWorkspacePicker(session);
|
|
1824
1824
|
return;
|
|
1825
1825
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { C as setActiveWorkspace, D as DEFAULT_API_URL, F as getSavedTheme, O as DEFAULT_APP_URL, P as getReviewStateDir, S as listWorkspaces, W as resolveWebUrl, a as WORDMARK, b as getActiveWorkspaceId, c as applyTheme, d as noColorRequested, f as theme, g as themeVersion, h as themeModeFromColorFgBg, i as MARK_CELLS, j as getConfigPath, l as findTheme, m as themeMode, n as buildCrashReport, p as themeForMode, q as saveTheme, r as writeCrashReport, s as DEFAULT_THEME_ID, t as installCrashHandler, u as monoTheme, v as themesForMode } from "./install-
|
|
2
|
+
import { C as setActiveWorkspace, D as DEFAULT_API_URL, F as getSavedTheme, O as DEFAULT_APP_URL, P as getReviewStateDir, S as listWorkspaces, W as resolveWebUrl, a as WORDMARK, b as getActiveWorkspaceId, c as applyTheme, d as noColorRequested, f as theme, g as themeVersion, h as themeModeFromColorFgBg, i as MARK_CELLS, j as getConfigPath, l as findTheme, m as themeMode, n as buildCrashReport, p as themeForMode, q as saveTheme, r as writeCrashReport, s as DEFAULT_THEME_ID, t as installCrashHandler, u as monoTheme, v as themesForMode } from "./install-BDaFCeB_.mjs";
|
|
3
3
|
import { a as errorMessage, i as sendErrorMessage, n as createRestClient, o as isRecord, r as errorDetail, t as HttpError } from "./rest-DMpigwmN.mjs";
|
|
4
4
|
import { 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 } from "./print-6Bm51XhR.mjs";
|
|
5
5
|
import "./api-BGWcPuik.mjs";
|
|
@@ -1072,19 +1072,42 @@ function windowStart(highlight, total, visible) {
|
|
|
1072
1072
|
|
|
1073
1073
|
//#endregion
|
|
1074
1074
|
//#region src/chat/tui/fuzzy.ts
|
|
1075
|
+
function keyAccessor(key) {
|
|
1076
|
+
return typeof key === "function" ? key : key.get;
|
|
1077
|
+
}
|
|
1078
|
+
function keyWeight(key) {
|
|
1079
|
+
return typeof key === "function" ? 1 : key.weight ?? 1;
|
|
1080
|
+
}
|
|
1075
1081
|
/**
|
|
1076
1082
|
* Rank `items` against `query` across multiple keys with fuzzysort — the
|
|
1077
1083
|
* OpenCode pattern. An empty/whitespace query returns everything in the
|
|
1078
1084
|
* caller's original order (fuzzysort has nothing to rank); otherwise items
|
|
1079
1085
|
* where no key matches are dropped and the rest come back best-first.
|
|
1086
|
+
*
|
|
1087
|
+
* fuzzysort's default multi-key score is the *best* single key's raw score,
|
|
1088
|
+
* with every key weighted equally — so an exact word sitting in a low-priority
|
|
1089
|
+
* field (a message preview, a co-participant's name) beats a genuine but
|
|
1090
|
+
* slightly-fuzzier match in the title. When keys carry weights we instead rank
|
|
1091
|
+
* by the best *weighted* key score, so a title match wins ties (and near-ties)
|
|
1092
|
+
* against secondary fields. Per-key highlight indexes are unchanged; only the
|
|
1093
|
+
* ordering shifts.
|
|
1080
1094
|
*/
|
|
1081
1095
|
function fuzzyFilter(query, items, keys) {
|
|
1082
1096
|
const needle = query.trim();
|
|
1097
|
+
const accessors = keys.map(keyAccessor);
|
|
1083
1098
|
if (!needle) return items.map((item) => ({
|
|
1084
1099
|
item,
|
|
1085
1100
|
highlights: keys.map(() => null)
|
|
1086
1101
|
}));
|
|
1087
|
-
|
|
1102
|
+
const weights = keys.map(keyWeight);
|
|
1103
|
+
const weighted = weights.some((w) => w !== 1);
|
|
1104
|
+
return fuzzysort.go(needle, items, {
|
|
1105
|
+
keys: accessors,
|
|
1106
|
+
...weighted ? { scoreFn: (r) => Math.max(...weights.map((w, i) => {
|
|
1107
|
+
const keyResult = r[i];
|
|
1108
|
+
return keyResult ? keyResult.score * w : 0;
|
|
1109
|
+
})) } : {}
|
|
1110
|
+
}).map((result) => ({
|
|
1088
1111
|
item: result.obj,
|
|
1089
1112
|
highlights: keys.map((_key, i) => {
|
|
1090
1113
|
const indexes = result[i]?.indexes;
|
|
@@ -1414,9 +1437,18 @@ function FilterableAgentList({ agents, scope, onPick }) {
|
|
|
1414
1437
|
});
|
|
1415
1438
|
}
|
|
1416
1439
|
const agentKeys = [
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1440
|
+
{
|
|
1441
|
+
get: (a) => a.name,
|
|
1442
|
+
weight: 1
|
|
1443
|
+
},
|
|
1444
|
+
{
|
|
1445
|
+
get: (a) => a.slug ?? "",
|
|
1446
|
+
weight: .6
|
|
1447
|
+
},
|
|
1448
|
+
{
|
|
1449
|
+
get: (a) => a.title ?? "",
|
|
1450
|
+
weight: .4
|
|
1451
|
+
}
|
|
1420
1452
|
];
|
|
1421
1453
|
|
|
1422
1454
|
//#endregion
|
|
@@ -1884,6 +1916,7 @@ function useDebouncedValue(value, delayMs) {
|
|
|
1884
1916
|
//#endregion
|
|
1885
1917
|
//#region src/chat/tui/screens/conversation-picker.tsx
|
|
1886
1918
|
const SEARCH_DEBOUNCE_MS = 250;
|
|
1919
|
+
const SEARCH_QUERY_MAX_LENGTH = 200;
|
|
1887
1920
|
const humanChannels = [
|
|
1888
1921
|
"web",
|
|
1889
1922
|
"slack",
|
|
@@ -2211,8 +2244,9 @@ function ConversationList({ agent, conversations, complete, showAutomated, onTog
|
|
|
2211
2244
|
placeholder: "type to filter…",
|
|
2212
2245
|
focused: confirmId === null,
|
|
2213
2246
|
width: Math.max(10, width - 12),
|
|
2247
|
+
maxLength: SEARCH_QUERY_MAX_LENGTH,
|
|
2214
2248
|
onInput: (value) => {
|
|
2215
|
-
setQuery(value);
|
|
2249
|
+
setQuery(value.slice(0, SEARCH_QUERY_MAX_LENGTH));
|
|
2216
2250
|
setHighlight(0);
|
|
2217
2251
|
}
|
|
2218
2252
|
})]
|
|
@@ -2276,9 +2310,18 @@ function conversationAgents(c) {
|
|
|
2276
2310
|
return c.agents && c.agents.length > 0 ? c.agents : [c.agent];
|
|
2277
2311
|
}
|
|
2278
2312
|
const conversationKeys = [
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2313
|
+
{
|
|
2314
|
+
get: (c) => singleLine(c.title ?? ""),
|
|
2315
|
+
weight: 1
|
|
2316
|
+
},
|
|
2317
|
+
{
|
|
2318
|
+
get: (c) => c.preview ?? "",
|
|
2319
|
+
weight: .6
|
|
2320
|
+
},
|
|
2321
|
+
{
|
|
2322
|
+
get: (c) => conversationAgents(c).map((a) => a.name).join(" "),
|
|
2323
|
+
weight: .4
|
|
2324
|
+
}
|
|
2282
2325
|
];
|
|
2283
2326
|
/**
|
|
2284
2327
|
* Character indexes of the first case-insensitive occurrence of `needle` in
|
|
@@ -5958,9 +6001,18 @@ function FilterableModelList({ models, currentModel, modelLocked, agentId, onSel
|
|
|
5958
6001
|
});
|
|
5959
6002
|
}
|
|
5960
6003
|
const modelKeys = [
|
|
5961
|
-
|
|
5962
|
-
|
|
5963
|
-
|
|
6004
|
+
{
|
|
6005
|
+
get: (m) => m.displayName,
|
|
6006
|
+
weight: 1
|
|
6007
|
+
},
|
|
6008
|
+
{
|
|
6009
|
+
get: (m) => m.providerDisplay ?? "",
|
|
6010
|
+
weight: .9
|
|
6011
|
+
},
|
|
6012
|
+
{
|
|
6013
|
+
get: (m) => m.id,
|
|
6014
|
+
weight: .9
|
|
6015
|
+
}
|
|
5964
6016
|
];
|
|
5965
6017
|
/**
|
|
5966
6018
|
* The REST error routes return `{ "error": "message" }`. Pull that out for a
|