replicas-cli 0.2.221 → 0.2.223
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/index.mjs +147 -52
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -8933,7 +8933,7 @@ var HOOK_EXEC_MAX_BUFFER_BYTES = 10 * 1024 * 1024;
|
|
|
8933
8933
|
var REPLICAS_CONFIG_FILENAMES = ["replicas.json", "replicas.yaml", "replicas.yml"];
|
|
8934
8934
|
|
|
8935
8935
|
// ../shared/src/cli-version.ts
|
|
8936
|
-
var CLI_VERSION = "0.2.
|
|
8936
|
+
var CLI_VERSION = "0.2.223";
|
|
8937
8937
|
|
|
8938
8938
|
// ../shared/src/engine/environment.ts
|
|
8939
8939
|
var DESKTOP_NOVNC_PORT = 6080;
|
|
@@ -10347,8 +10347,8 @@ var SOURCE_CONFIG = {
|
|
|
10347
10347
|
github_pr_existing_general: { label: "GitHub PR", color: "#8b949e" },
|
|
10348
10348
|
slack_task: { label: "Slack", color: "#BF6CC2" },
|
|
10349
10349
|
automation_triggered: { label: "Automation", color: "#f59e0b" },
|
|
10350
|
-
plan_quote: { label: "Plan", color: "#
|
|
10351
|
-
inline_diff_comments: { label: "Diff Comments", color: "#
|
|
10350
|
+
plan_quote: { label: "Plan", color: "#3eeba3" },
|
|
10351
|
+
inline_diff_comments: { label: "Diff Comments", color: "#3eeba3" },
|
|
10352
10352
|
merged: { label: "Bundled", color: "#a3a3a3" }
|
|
10353
10353
|
};
|
|
10354
10354
|
|
|
@@ -13096,7 +13096,7 @@ async function mediaListCommand(options) {
|
|
|
13096
13096
|
|
|
13097
13097
|
// src/commands/computer.ts
|
|
13098
13098
|
import { spawn as spawn3, spawnSync } from "child_process";
|
|
13099
|
-
import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "fs";
|
|
13099
|
+
import { closeSync, existsSync, mkdirSync, openSync, readFileSync, readSync, rmSync, writeFileSync } from "fs";
|
|
13100
13100
|
import { dirname, isAbsolute, resolve } from "path";
|
|
13101
13101
|
import chalk19 from "chalk";
|
|
13102
13102
|
var STATE_DIR = process.env.REPLICAS_DESKTOP_STATE_DIR || "/tmp/replicas-computer";
|
|
@@ -13180,10 +13180,105 @@ async function computerStatusCommand() {
|
|
|
13180
13180
|
console.log(` ${chalk19.dim("preview: not yet registered (engine registers it at startup)")}`);
|
|
13181
13181
|
}
|
|
13182
13182
|
}
|
|
13183
|
+
var PNG_SIGNATURE = Buffer.from([137, 80, 78, 71, 13, 10, 26, 10]);
|
|
13184
|
+
function readPngDimensions(filePath) {
|
|
13185
|
+
const fd = openSync(filePath, "r");
|
|
13186
|
+
try {
|
|
13187
|
+
const buf = Buffer.alloc(24);
|
|
13188
|
+
const bytesRead = readSync(fd, buf, 0, 24, 0);
|
|
13189
|
+
if (bytesRead < 24 || !buf.subarray(0, 8).equals(PNG_SIGNATURE)) {
|
|
13190
|
+
fail(`${filePath} is not a valid PNG (read ${bytesRead}/24 bytes)`);
|
|
13191
|
+
}
|
|
13192
|
+
return { width: buf.readUInt32BE(16), height: buf.readUInt32BE(20) };
|
|
13193
|
+
} finally {
|
|
13194
|
+
closeSync(fd);
|
|
13195
|
+
}
|
|
13196
|
+
}
|
|
13197
|
+
function brandSvgPath() {
|
|
13198
|
+
const dir = process.env.REPLICAS_DESKTOP_TEMPLATES || "/usr/local/share/replicas/desktop";
|
|
13199
|
+
return `${dir}/brand-wallpaper.svg`;
|
|
13200
|
+
}
|
|
13201
|
+
function loadBrandSvg(canvasW, canvasH) {
|
|
13202
|
+
const path6 = brandSvgPath();
|
|
13203
|
+
if (!existsSync(path6)) {
|
|
13204
|
+
fail(
|
|
13205
|
+
`Brand wallpaper SVG missing at ${path6}. The workspace image is out of date \u2014 \`desktop/brand-wallpaper.svg\` must be installed at $REPLICAS_DESKTOP_TEMPLATES.`
|
|
13206
|
+
);
|
|
13207
|
+
}
|
|
13208
|
+
return readFileSync(path6, "utf8").replace(/(<svg[^>]*\s)width="\d+"/, `$1width="${canvasW}"`).replace(/(<svg[^>]*\s)height="\d+"/, `$1height="${canvasH}"`);
|
|
13209
|
+
}
|
|
13210
|
+
var BRAND_PAD_FRACTION = 0.06;
|
|
13211
|
+
var SCREENSHOT_CORNER_FRACTION = 0.022;
|
|
13212
|
+
var SHADOW_SIGMA_FRACTION = 0.022;
|
|
13213
|
+
var SHADOW_OFFSET_Y_FRACTION = 0.013;
|
|
13214
|
+
var SHADOW_ALPHA = 0.6;
|
|
13215
|
+
var SCREENSHOT_MASK_TEMPLATE = `<svg width="__W__" height="__H__" xmlns="http://www.w3.org/2000/svg"><rect width="__W__" height="__H__" rx="__R__" ry="__R__" fill="white"/></svg>`;
|
|
13216
|
+
var SHADOW_MASK_TEMPLATE = `<svg width="__SW__" height="__SH__" xmlns="http://www.w3.org/2000/svg"><rect x="__M__" y="__M__" width="__W__" height="__H__" rx="__R__" ry="__R__" fill="white"/></svg>`;
|
|
13183
13217
|
async function computerScreenshotCommand(path6) {
|
|
13184
13218
|
const target = resolvePath(path6);
|
|
13185
13219
|
mkdirSync(dirname(target), { recursive: true });
|
|
13186
|
-
|
|
13220
|
+
const stamp = `${process.pid}-${Date.now()}`;
|
|
13221
|
+
const rawPath = `/tmp/replicas-screenshot-${stamp}.raw.png`;
|
|
13222
|
+
const svgPath = `/tmp/replicas-screenshot-${stamp}.brand.svg`;
|
|
13223
|
+
const maskPath = `/tmp/replicas-screenshot-${stamp}.mask.svg`;
|
|
13224
|
+
const shadowPath = `/tmp/replicas-screenshot-${stamp}.shadow.svg`;
|
|
13225
|
+
try {
|
|
13226
|
+
runDisplayCmd("scrot", ["-o", rawPath]);
|
|
13227
|
+
const { width, height } = readPngDimensions(rawPath);
|
|
13228
|
+
const padX = Math.round(width * BRAND_PAD_FRACTION);
|
|
13229
|
+
const padY = Math.round(height * BRAND_PAD_FRACTION);
|
|
13230
|
+
const canvasW = width + padX * 2;
|
|
13231
|
+
const canvasH = height + padY * 2;
|
|
13232
|
+
const minDim = Math.min(width, height);
|
|
13233
|
+
const cornerR = Math.round(minDim * SCREENSHOT_CORNER_FRACTION);
|
|
13234
|
+
const shadowSigma = Math.max(12, Math.round(minDim * SHADOW_SIGMA_FRACTION));
|
|
13235
|
+
const shadowOffsetY = Math.round(minDim * SHADOW_OFFSET_Y_FRACTION);
|
|
13236
|
+
const shadowMargin = shadowSigma * 3;
|
|
13237
|
+
const shadowW = width + shadowMargin * 2;
|
|
13238
|
+
const shadowH = height + shadowMargin * 2;
|
|
13239
|
+
writeFileSync(svgPath, loadBrandSvg(canvasW, canvasH));
|
|
13240
|
+
writeFileSync(
|
|
13241
|
+
maskPath,
|
|
13242
|
+
SCREENSHOT_MASK_TEMPLATE.replace(/__W__/g, String(width)).replace(/__H__/g, String(height)).replace(/__R__/g, String(cornerR))
|
|
13243
|
+
);
|
|
13244
|
+
writeFileSync(
|
|
13245
|
+
shadowPath,
|
|
13246
|
+
SHADOW_MASK_TEMPLATE.replace(/__SW__/g, String(shadowW)).replace(/__SH__/g, String(shadowH)).replace(/__M__/g, String(shadowMargin)).replace(/__W__/g, String(width)).replace(/__H__/g, String(height)).replace(/__R__/g, String(cornerR))
|
|
13247
|
+
);
|
|
13248
|
+
const r = spawnSync(
|
|
13249
|
+
"ffmpeg",
|
|
13250
|
+
[
|
|
13251
|
+
"-y",
|
|
13252
|
+
"-hide_banner",
|
|
13253
|
+
"-loglevel",
|
|
13254
|
+
"error",
|
|
13255
|
+
"-i",
|
|
13256
|
+
svgPath,
|
|
13257
|
+
"-i",
|
|
13258
|
+
rawPath,
|
|
13259
|
+
"-i",
|
|
13260
|
+
maskPath,
|
|
13261
|
+
"-i",
|
|
13262
|
+
shadowPath,
|
|
13263
|
+
"-filter_complex",
|
|
13264
|
+
`[2:v]format=rgba,alphaextract[mask];[3:v]format=rgba,colorchannelmixer=rr=0:gg=0:bb=0:aa=${SHADOW_ALPHA},gblur=sigma=${shadowSigma}[shadow];[1:v]format=rgba[scr];[scr][mask]alphamerge[rounded];[0:v]format=rgba[bg];[bg][shadow]overlay=${padX - shadowMargin}:${padY - shadowMargin + shadowOffsetY}:format=auto[bg_shadow];[bg_shadow][rounded]overlay=${padX}:${padY}:format=auto`,
|
|
13265
|
+
"-frames:v",
|
|
13266
|
+
"1",
|
|
13267
|
+
"-update",
|
|
13268
|
+
"1",
|
|
13269
|
+
target
|
|
13270
|
+
],
|
|
13271
|
+
{ stdio: "pipe" }
|
|
13272
|
+
);
|
|
13273
|
+
if (r.status !== 0) {
|
|
13274
|
+
fail(`ffmpeg branding failed: ${r.stderr?.toString().trim() || `exit ${r.status}`}`);
|
|
13275
|
+
}
|
|
13276
|
+
} finally {
|
|
13277
|
+
rmSync(rawPath, { force: true });
|
|
13278
|
+
rmSync(svgPath, { force: true });
|
|
13279
|
+
rmSync(maskPath, { force: true });
|
|
13280
|
+
rmSync(shadowPath, { force: true });
|
|
13281
|
+
}
|
|
13187
13282
|
console.log(target);
|
|
13188
13283
|
}
|
|
13189
13284
|
async function computerClickCommand(xStr, yStr, options) {
|
|
@@ -13875,7 +13970,7 @@ function StatusBar({ focusPanel, viewingDiff, hasDiffAvailable }) {
|
|
|
13875
13970
|
justifyContent: "space-between",
|
|
13876
13971
|
width: "100%",
|
|
13877
13972
|
children: [
|
|
13878
|
-
/* @__PURE__ */ jsx("text", { children: /* @__PURE__ */ jsx("span", { fg: "#
|
|
13973
|
+
/* @__PURE__ */ jsx("text", { children: /* @__PURE__ */ jsx("span", { fg: "#3eeba3", children: /* @__PURE__ */ jsx("strong", { children: "Replicas" }) }) }),
|
|
13879
13974
|
/* @__PURE__ */ jsxs("text", { children: [
|
|
13880
13975
|
/* @__PURE__ */ jsxs("span", { fg: "#555555", children: [
|
|
13881
13976
|
hints,
|
|
@@ -14115,7 +14210,7 @@ function WorkspaceSidebar({
|
|
|
14115
14210
|
width: 28,
|
|
14116
14211
|
border: true,
|
|
14117
14212
|
borderStyle: "rounded",
|
|
14118
|
-
borderColor: focused ? "#
|
|
14213
|
+
borderColor: focused ? "#3eeba3" : "#333333",
|
|
14119
14214
|
title: "Workspaces",
|
|
14120
14215
|
titleAlignment: "center",
|
|
14121
14216
|
flexDirection: "column",
|
|
@@ -14154,8 +14249,8 @@ function WorkspaceSidebar({
|
|
|
14154
14249
|
const isSelected = item.workspaceId === selectedWorkspaceId;
|
|
14155
14250
|
const isConfirming = confirmDelete === item.workspaceId;
|
|
14156
14251
|
const dot = item.status === "active" ? "\u25CF" : item.status === "preparing" ? "\u25CC" : "\u25CB";
|
|
14157
|
-
const dotColor = item.status === "active" ? "#
|
|
14158
|
-
const nameColor = isSelected ? "#
|
|
14252
|
+
const dotColor = item.status === "active" ? "#3eeba3" : item.status === "preparing" ? "#ffaa00" : "#666666";
|
|
14253
|
+
const nameColor = isSelected ? "#3eeba3" : "#cccccc";
|
|
14159
14254
|
const itemBg = isConfirming ? "#331111" : isCursor ? "#1a1a1a" : isSelected ? "#0a1a0a" : "#0a0a0a";
|
|
14160
14255
|
if (isConfirming) {
|
|
14161
14256
|
return /* @__PURE__ */ jsxs2("box", { height: 1, backgroundColor: "#331111", paddingX: 1, flexDirection: "row", gap: 1, children: [
|
|
@@ -14163,7 +14258,7 @@ function WorkspaceSidebar({
|
|
|
14163
14258
|
/* @__PURE__ */ jsx2("box", { onMouseDown: () => {
|
|
14164
14259
|
onDeleteWorkspace(item.workspaceId);
|
|
14165
14260
|
setConfirmDelete(null);
|
|
14166
|
-
}, children: /* @__PURE__ */ jsx2("text", { children: /* @__PURE__ */ jsx2("span", { fg: "#
|
|
14261
|
+
}, children: /* @__PURE__ */ jsx2("text", { children: /* @__PURE__ */ jsx2("span", { fg: "#3eeba3", children: "[y]" }) }) }),
|
|
14167
14262
|
/* @__PURE__ */ jsx2("box", { onMouseDown: () => setConfirmDelete(null), children: /* @__PURE__ */ jsx2("text", { children: /* @__PURE__ */ jsx2("span", { fg: "#ff4444", children: "[n]" }) }) })
|
|
14168
14263
|
] }, `w-${item.workspaceId}`);
|
|
14169
14264
|
}
|
|
@@ -14199,7 +14294,7 @@ function WorkspaceSidebar({
|
|
|
14199
14294
|
paddingX: 1,
|
|
14200
14295
|
onMouseDown: () => handleItemClick(globalIndex),
|
|
14201
14296
|
children: /* @__PURE__ */ jsxs2("text", { children: [
|
|
14202
|
-
/* @__PURE__ */ jsx2("span", { fg: isCursor ? "#
|
|
14297
|
+
/* @__PURE__ */ jsx2("span", { fg: isCursor ? "#3eeba3" : "#444444", children: " + " }),
|
|
14203
14298
|
/* @__PURE__ */ jsx2("span", { fg: isCursor ? "#888888" : "#333333", children: "New workspace" })
|
|
14204
14299
|
] })
|
|
14205
14300
|
},
|
|
@@ -14228,11 +14323,11 @@ import { useState as useState5, useMemo as useMemo4 } from "react";
|
|
|
14228
14323
|
import "opentui-spinner/react";
|
|
14229
14324
|
import { createPulse } from "opentui-spinner";
|
|
14230
14325
|
import { jsx as jsx3, jsxs as jsxs3 } from "@opentui/react/jsx-runtime";
|
|
14231
|
-
var thinkingColor = createPulse(["#
|
|
14326
|
+
var thinkingColor = createPulse(["#3eeba3", "#2ca774", "#1c6a49"], 0.5);
|
|
14232
14327
|
function SpinnerLabel({ color, label }) {
|
|
14233
14328
|
return /* @__PURE__ */ jsxs3("box", { flexDirection: "row", gap: 1, children: [
|
|
14234
14329
|
/* @__PURE__ */ jsx3("spinner", { name: "dots", color: color ?? thinkingColor, interval: 80 }),
|
|
14235
|
-
label && /* @__PURE__ */ jsx3("text", { children: /* @__PURE__ */ jsx3("span", { fg: color ?? "#
|
|
14330
|
+
label && /* @__PURE__ */ jsx3("text", { children: /* @__PURE__ */ jsx3("span", { fg: color ?? "#3eeba3", children: label }) })
|
|
14236
14331
|
] });
|
|
14237
14332
|
}
|
|
14238
14333
|
|
|
@@ -14248,14 +14343,14 @@ var sharedSyntaxStyle = null;
|
|
|
14248
14343
|
function getSyntaxStyle() {
|
|
14249
14344
|
if (!sharedSyntaxStyle) {
|
|
14250
14345
|
sharedSyntaxStyle = SyntaxStyle.fromTheme([
|
|
14251
|
-
{ scope: ["markup.heading", "markup.heading.1", "markup.heading.2", "markup.heading.3"], style: { foreground: "#
|
|
14346
|
+
{ scope: ["markup.heading", "markup.heading.1", "markup.heading.2", "markup.heading.3"], style: { foreground: "#3eeba3", bold: true } },
|
|
14252
14347
|
{ scope: ["markup.bold", "markup.strong"], style: { foreground: "#ffffff", bold: true } },
|
|
14253
14348
|
{ scope: ["markup.italic", "markup.emphasis"], style: { foreground: "#e0e0e0", italic: true } },
|
|
14254
14349
|
{ scope: ["markup.link"], style: { foreground: "#7dcfff", underline: true } },
|
|
14255
14350
|
{ scope: ["markup.link.url"], style: { foreground: "#7dcfff", underline: true } },
|
|
14256
|
-
{ scope: ["markup.link.text"], style: { foreground: "#
|
|
14257
|
-
{ scope: ["markup.link.label"], style: { foreground: "#
|
|
14258
|
-
{ scope: ["markup.list"], style: { foreground: "#
|
|
14351
|
+
{ scope: ["markup.link.text"], style: { foreground: "#3eeba3", underline: true } },
|
|
14352
|
+
{ scope: ["markup.link.label"], style: { foreground: "#3eeba3", underline: true } },
|
|
14353
|
+
{ scope: ["markup.list"], style: { foreground: "#3eeba3" } },
|
|
14259
14354
|
{ scope: ["markup.quote"], style: { foreground: "#888888", italic: true } },
|
|
14260
14355
|
{ scope: ["markup.raw", "markup.raw.block"], style: { foreground: "#bb9af7" } },
|
|
14261
14356
|
{ scope: ["markup.raw.inline"], style: { foreground: "#bb9af7", background: "#1a1a2e" } },
|
|
@@ -14361,7 +14456,7 @@ function diffProps(filePath) {
|
|
|
14361
14456
|
addedBg: "#0d2b0d",
|
|
14362
14457
|
removedBg: "#2b0d0d",
|
|
14363
14458
|
contextBg: "#0a0a0a",
|
|
14364
|
-
addedSignColor: "#
|
|
14459
|
+
addedSignColor: "#3eeba3",
|
|
14365
14460
|
removedSignColor: "#ff4444",
|
|
14366
14461
|
lineNumberFg: "#555555",
|
|
14367
14462
|
lineNumberBg: "#0a0a0a",
|
|
@@ -14611,8 +14706,8 @@ function DiffViewer({ diff, repoName, focused }) {
|
|
|
14611
14706
|
flexShrink: 0,
|
|
14612
14707
|
children: [
|
|
14613
14708
|
/* @__PURE__ */ jsx4("box", { paddingX: 1, flexShrink: 0, height: 1, children: /* @__PURE__ */ jsxs4("text", { children: [
|
|
14614
|
-
/* @__PURE__ */ jsx4("span", { fg: filesPaneActive ? "#
|
|
14615
|
-
/* @__PURE__ */ jsx4("span", { fg: filesPaneActive ? "#
|
|
14709
|
+
/* @__PURE__ */ jsx4("span", { fg: filesPaneActive ? "#3eeba3" : "#333333", children: filesPaneActive ? "\u25B8 " : " " }),
|
|
14710
|
+
/* @__PURE__ */ jsx4("span", { fg: filesPaneActive ? "#3eeba3" : "#888888", children: filesPaneActive ? /* @__PURE__ */ jsxs4("strong", { children: [
|
|
14616
14711
|
files.length,
|
|
14617
14712
|
" ",
|
|
14618
14713
|
files.length === 1 ? "file" : "files",
|
|
@@ -14657,7 +14752,7 @@ function DiffViewer({ diff, repoName, focused }) {
|
|
|
14657
14752
|
const removed = node.removed ?? 0;
|
|
14658
14753
|
const addedPart = added > 0 ? `+${added}` : "";
|
|
14659
14754
|
const removedPart = removed > 0 ? `-${removed}` : "";
|
|
14660
|
-
const bubbleColor = added > 0 && removed > 0 ? "#ffaa00" : removed > 0 ? "#ff4444" : "#
|
|
14755
|
+
const bubbleColor = added > 0 && removed > 0 ? "#ffaa00" : removed > 0 ? "#ff4444" : "#3eeba3";
|
|
14661
14756
|
const overhead = indent.length + 2 + statsColumnWidth + 1;
|
|
14662
14757
|
const nameMax = Math.max(1, usable - overhead);
|
|
14663
14758
|
const displayName = truncateName(node.name, nameMax);
|
|
@@ -14679,10 +14774,10 @@ function DiffViewer({ diff, repoName, focused }) {
|
|
|
14679
14774
|
"\u25CF",
|
|
14680
14775
|
" "
|
|
14681
14776
|
] }),
|
|
14682
|
-
/* @__PURE__ */ jsx4("span", { fg: isSelectedFile || isCursor ? "#
|
|
14777
|
+
/* @__PURE__ */ jsx4("span", { fg: isSelectedFile || isCursor ? "#3eeba3" : "#cccccc", children: displayName })
|
|
14683
14778
|
] }),
|
|
14684
14779
|
/* @__PURE__ */ jsx4("box", { width: statsColumnWidth, flexShrink: 0, justifyContent: "flex-end", flexDirection: "row", children: /* @__PURE__ */ jsxs4("text", { children: [
|
|
14685
|
-
addedPart && /* @__PURE__ */ jsx4("span", { fg: "#
|
|
14780
|
+
addedPart && /* @__PURE__ */ jsx4("span", { fg: "#3eeba3", children: addedPart }),
|
|
14686
14781
|
addedPart && removedPart && /* @__PURE__ */ jsx4("span", { fg: "#444444", children: " " }),
|
|
14687
14782
|
removedPart && /* @__PURE__ */ jsx4("span", { fg: "#ff4444", children: removedPart })
|
|
14688
14783
|
] }) })
|
|
@@ -14699,7 +14794,7 @@ function DiffViewer({ diff, repoName, focused }) {
|
|
|
14699
14794
|
/* @__PURE__ */ jsxs4("box", { flexDirection: "row", justifyContent: "space-between", height: 1, children: [
|
|
14700
14795
|
/* @__PURE__ */ jsxs4("text", { children: [
|
|
14701
14796
|
/* @__PURE__ */ jsx4("span", { fg: "#ffffff", children: /* @__PURE__ */ jsx4("strong", { children: repoName }) }),
|
|
14702
|
-
totalAdded > 0 && /* @__PURE__ */ jsxs4("span", { fg: "#
|
|
14797
|
+
totalAdded > 0 && /* @__PURE__ */ jsxs4("span", { fg: "#3eeba3", children: [
|
|
14703
14798
|
" +",
|
|
14704
14799
|
totalAdded
|
|
14705
14800
|
] }),
|
|
@@ -14716,14 +14811,14 @@ function DiffViewer({ diff, repoName, focused }) {
|
|
|
14716
14811
|
] })
|
|
14717
14812
|
] }),
|
|
14718
14813
|
/* @__PURE__ */ jsx4("box", { flexDirection: "row", height: 1, backgroundColor: "#0d0d0d", paddingX: 1, children: /* @__PURE__ */ jsxs4("text", { children: [
|
|
14719
|
-
/* @__PURE__ */ jsx4("span", { fg: diffPaneActive ? "#
|
|
14814
|
+
/* @__PURE__ */ jsx4("span", { fg: diffPaneActive ? "#3eeba3" : "#444444", children: diffPaneActive ? "\u25B8 " : " " }),
|
|
14720
14815
|
(() => {
|
|
14721
14816
|
const lastSlash = selected.path.lastIndexOf("/");
|
|
14722
14817
|
const dir = lastSlash >= 0 ? selected.path.slice(0, lastSlash + 1) : "";
|
|
14723
14818
|
const base = lastSlash >= 0 ? selected.path.slice(lastSlash + 1) : selected.path;
|
|
14724
14819
|
return /* @__PURE__ */ jsxs4(Fragment, { children: [
|
|
14725
14820
|
dir && /* @__PURE__ */ jsx4("span", { fg: "#666666", children: dir }),
|
|
14726
|
-
/* @__PURE__ */ jsx4("span", { fg: diffPaneActive ? "#
|
|
14821
|
+
/* @__PURE__ */ jsx4("span", { fg: diffPaneActive ? "#3eeba3" : "#ffffff", children: /* @__PURE__ */ jsx4("strong", { children: base }) })
|
|
14727
14822
|
] });
|
|
14728
14823
|
})()
|
|
14729
14824
|
] }) })
|
|
@@ -14954,7 +15049,7 @@ function truncate4(text, maxLen) {
|
|
|
14954
15049
|
return text.length > maxLen ? text.slice(0, maxLen - 1) + "\u2026" : text;
|
|
14955
15050
|
}
|
|
14956
15051
|
function StatusIcon({ status }) {
|
|
14957
|
-
if (status === "completed") return /* @__PURE__ */ jsxs6("span", { fg: "#
|
|
15052
|
+
if (status === "completed") return /* @__PURE__ */ jsxs6("span", { fg: "#3eeba3", children: [
|
|
14958
15053
|
" ",
|
|
14959
15054
|
"\u2713"
|
|
14960
15055
|
] });
|
|
@@ -15020,7 +15115,7 @@ function ExpandableAction({
|
|
|
15020
15115
|
] });
|
|
15021
15116
|
}
|
|
15022
15117
|
var CHANGE_STYLE = {
|
|
15023
|
-
add: { color: "#
|
|
15118
|
+
add: { color: "#3eeba3", sign: "+" },
|
|
15024
15119
|
delete: { color: "#ff4444", sign: "-" }
|
|
15025
15120
|
};
|
|
15026
15121
|
var DEFAULT_CHANGE_STYLE = { color: "#ffaa00", sign: "~" };
|
|
@@ -15055,7 +15150,7 @@ function PatchOperation({ op, defaultExpanded = false }) {
|
|
|
15055
15150
|
stats.removed
|
|
15056
15151
|
] }),
|
|
15057
15152
|
stats.removed > 0 && stats.added > 0 && /* @__PURE__ */ jsx6("span", { fg: "#444444", children: " " }),
|
|
15058
|
-
stats.added > 0 && /* @__PURE__ */ jsxs6("span", { fg: "#
|
|
15153
|
+
stats.added > 0 && /* @__PURE__ */ jsxs6("span", { fg: "#3eeba3", children: [
|
|
15059
15154
|
"+",
|
|
15060
15155
|
stats.added
|
|
15061
15156
|
] })
|
|
@@ -15080,7 +15175,7 @@ function UserMessageContent({ content }) {
|
|
|
15080
15175
|
paddingY: 1,
|
|
15081
15176
|
marginX: 1,
|
|
15082
15177
|
children: isStructuredPrompt(parsed) ? /* @__PURE__ */ jsx6(StructuredUserMessage, { parsed }) : /* @__PURE__ */ jsxs6(Fragment3, { children: [
|
|
15083
|
-
/* @__PURE__ */ jsx6("text", { children: /* @__PURE__ */ jsx6("span", { fg: "#
|
|
15178
|
+
/* @__PURE__ */ jsx6("text", { children: /* @__PURE__ */ jsx6("span", { fg: "#3eeba3", children: /* @__PURE__ */ jsx6("strong", { children: "You" }) }) }),
|
|
15084
15179
|
/* @__PURE__ */ jsx6("text", { fg: "#ffffff", selectable: true, children: content })
|
|
15085
15180
|
] })
|
|
15086
15181
|
}
|
|
@@ -15096,7 +15191,7 @@ function ChatMessage({ message, provider }) {
|
|
|
15096
15191
|
}
|
|
15097
15192
|
case "agent":
|
|
15098
15193
|
return /* @__PURE__ */ jsxs6("box", { flexDirection: "column", paddingX: 1, children: [
|
|
15099
|
-
/* @__PURE__ */ jsx6("text", { children: /* @__PURE__ */ jsx6("span", { fg: "#
|
|
15194
|
+
/* @__PURE__ */ jsx6("text", { children: /* @__PURE__ */ jsx6("span", { fg: "#3eeba3", children: /* @__PURE__ */ jsx6("strong", { children: AGENT_LABELS[provider] }) }) }),
|
|
15100
15195
|
/* @__PURE__ */ jsx6(
|
|
15101
15196
|
"markdown",
|
|
15102
15197
|
{
|
|
@@ -15156,7 +15251,7 @@ function ChatMessage({ message, provider }) {
|
|
|
15156
15251
|
")"
|
|
15157
15252
|
] }) }) }),
|
|
15158
15253
|
message.items.map((item, i) => /* @__PURE__ */ jsxs6("text", { children: [
|
|
15159
|
-
/* @__PURE__ */ jsx6("span", { fg: item.completed ? "#
|
|
15254
|
+
/* @__PURE__ */ jsx6("span", { fg: item.completed ? "#3eeba3" : "#555555", children: item.completed ? " \u2611" : " \u2610" }),
|
|
15160
15255
|
/* @__PURE__ */ jsxs6("span", { fg: "#ffffff", children: [
|
|
15161
15256
|
" ",
|
|
15162
15257
|
item.text
|
|
@@ -15189,7 +15284,7 @@ var textareaKeyBindings = [
|
|
|
15189
15284
|
{ name: "return", meta: true, action: "newline" }
|
|
15190
15285
|
];
|
|
15191
15286
|
var MODE_COLORS = {
|
|
15192
|
-
build: { border: "#
|
|
15287
|
+
build: { border: "#3eeba3", text: "#3eeba3" },
|
|
15193
15288
|
plan: { border: "#d97706", text: "#d97706" }
|
|
15194
15289
|
};
|
|
15195
15290
|
function ChatArea({
|
|
@@ -15267,7 +15362,7 @@ function ChatArea({
|
|
|
15267
15362
|
flexGrow: 1,
|
|
15268
15363
|
border: true,
|
|
15269
15364
|
borderStyle: "rounded",
|
|
15270
|
-
borderColor: anyFocused ? "#
|
|
15365
|
+
borderColor: anyFocused ? "#3eeba3" : "#333333",
|
|
15271
15366
|
title: "Chat",
|
|
15272
15367
|
titleAlignment: "center",
|
|
15273
15368
|
flexDirection: "column",
|
|
@@ -15280,7 +15375,7 @@ function ChatArea({
|
|
|
15280
15375
|
paddingX: 1,
|
|
15281
15376
|
marginX: 1,
|
|
15282
15377
|
border: true,
|
|
15283
|
-
borderColor: tabsFocused ? "#
|
|
15378
|
+
borderColor: tabsFocused ? "#3eeba3" : "#333333",
|
|
15284
15379
|
backgroundColor: "#000000",
|
|
15285
15380
|
flexDirection: "row",
|
|
15286
15381
|
gap: 1,
|
|
@@ -15480,7 +15575,7 @@ var AUTH_METHOD_LABELS = {
|
|
|
15480
15575
|
};
|
|
15481
15576
|
function StatusDot({ status }) {
|
|
15482
15577
|
if (status === true || status === "yes") {
|
|
15483
|
-
return /* @__PURE__ */ jsx8("span", { fg: "#
|
|
15578
|
+
return /* @__PURE__ */ jsx8("span", { fg: "#3eeba3", children: "\u2713" });
|
|
15484
15579
|
}
|
|
15485
15580
|
if (status === false || status === "no") {
|
|
15486
15581
|
return /* @__PURE__ */ jsx8("span", { fg: "#ff4444", children: "\u2717" });
|
|
@@ -15533,7 +15628,7 @@ function InteractiveRow({ id, label, highlighted, disabled, onClick }) {
|
|
|
15533
15628
|
paddingX: 1,
|
|
15534
15629
|
backgroundColor: highlighted ? "#1a2a1a" : "#111111",
|
|
15535
15630
|
onMouseDown: onClick,
|
|
15536
|
-
children: /* @__PURE__ */ jsx8("text", { children: /* @__PURE__ */ jsx8("span", { fg: highlighted ? "#
|
|
15631
|
+
children: /* @__PURE__ */ jsx8("text", { children: /* @__PURE__ */ jsx8("span", { fg: highlighted ? "#3eeba3" : "#7dcfff", children: label }) })
|
|
15537
15632
|
}
|
|
15538
15633
|
);
|
|
15539
15634
|
}
|
|
@@ -15546,7 +15641,7 @@ function ViewModeRow({
|
|
|
15546
15641
|
onClick
|
|
15547
15642
|
}) {
|
|
15548
15643
|
const bg = highlighted ? "#1a2a1a" : "#111111";
|
|
15549
|
-
const fg = disabled ? "#444444" : active ? "#
|
|
15644
|
+
const fg = disabled ? "#444444" : active ? "#3eeba3" : "#cccccc";
|
|
15550
15645
|
const marker = active ? "\u25B8" : " ";
|
|
15551
15646
|
return /* @__PURE__ */ jsx8(
|
|
15552
15647
|
"box",
|
|
@@ -15556,7 +15651,7 @@ function ViewModeRow({
|
|
|
15556
15651
|
backgroundColor: bg,
|
|
15557
15652
|
onMouseDown: disabled ? void 0 : onClick,
|
|
15558
15653
|
children: /* @__PURE__ */ jsxs8("text", { children: [
|
|
15559
|
-
/* @__PURE__ */ jsxs8("span", { fg: active ? "#
|
|
15654
|
+
/* @__PURE__ */ jsxs8("span", { fg: active ? "#3eeba3" : "#555555", children: [
|
|
15560
15655
|
marker,
|
|
15561
15656
|
" "
|
|
15562
15657
|
] }),
|
|
@@ -15566,7 +15661,7 @@ function ViewModeRow({
|
|
|
15566
15661
|
);
|
|
15567
15662
|
}
|
|
15568
15663
|
function WorkspaceInfo({ status, workspaceName, workspaceId, focused, loading, agentAvailability, previews, onWakeWorkspace, onViewDiff, wakingWorkspaceId, viewMode, viewingDiffRepoName, onSelectChatMode, onSelectDiffMode, onCreatePr, isPlanMode }) {
|
|
15569
|
-
const borderColor = focused ? "#
|
|
15664
|
+
const borderColor = focused ? "#3eeba3" : "#333333";
|
|
15570
15665
|
const [cursorIndex, setCursorIndex] = useState6(0);
|
|
15571
15666
|
const interactiveItems = useMemo5(() => {
|
|
15572
15667
|
if (!status || !workspaceName) return [];
|
|
@@ -15713,7 +15808,7 @@ function WorkspaceInfo({ status, workspaceName, workspaceId, focused, loading, a
|
|
|
15713
15808
|
}
|
|
15714
15809
|
);
|
|
15715
15810
|
}
|
|
15716
|
-
const statusColor = status.status === "active" ? "#
|
|
15811
|
+
const statusColor = status.status === "active" ? "#3eeba3" : status.status === "sleeping" ? "#ffaa00" : "#ff4444";
|
|
15717
15812
|
const rawEnv = status.environmentDetails;
|
|
15718
15813
|
const env = rawEnv && agentAvailability ? {
|
|
15719
15814
|
...rawEnv,
|
|
@@ -15796,11 +15891,11 @@ function WorkspaceInfo({ status, workspaceName, workspaceId, focused, loading, a
|
|
|
15796
15891
|
env && /* @__PURE__ */ jsxs8(Section, { title: "Agents", children: [
|
|
15797
15892
|
/* @__PURE__ */ jsxs8("box", { flexDirection: "row", justifyContent: "space-between", paddingX: 1, backgroundColor: "#111111", children: [
|
|
15798
15893
|
/* @__PURE__ */ jsx8("text", { children: /* @__PURE__ */ jsx8("span", { fg: "#cccccc", children: "Claude" }) }),
|
|
15799
|
-
/* @__PURE__ */ jsx8("text", { children: AUTH_METHOD_LABELS[env.claudeAuthMethod] ? /* @__PURE__ */ jsx8("span", { fg: "#
|
|
15894
|
+
/* @__PURE__ */ jsx8("text", { children: AUTH_METHOD_LABELS[env.claudeAuthMethod] ? /* @__PURE__ */ jsx8("span", { fg: "#3eeba3", children: AUTH_METHOD_LABELS[env.claudeAuthMethod] }) : /* @__PURE__ */ jsx8("span", { fg: "#ff4444", children: "\u2717" }) })
|
|
15800
15895
|
] }),
|
|
15801
15896
|
/* @__PURE__ */ jsxs8("box", { flexDirection: "row", justifyContent: "space-between", paddingX: 1, backgroundColor: "#111111", children: [
|
|
15802
15897
|
/* @__PURE__ */ jsx8("text", { children: /* @__PURE__ */ jsx8("span", { fg: "#cccccc", children: "Codex" }) }),
|
|
15803
|
-
/* @__PURE__ */ jsx8("text", { children: AUTH_METHOD_LABELS[env.codexAuthMethod] ? /* @__PURE__ */ jsx8("span", { fg: "#
|
|
15898
|
+
/* @__PURE__ */ jsx8("text", { children: AUTH_METHOD_LABELS[env.codexAuthMethod] ? /* @__PURE__ */ jsx8("span", { fg: "#3eeba3", children: AUTH_METHOD_LABELS[env.codexAuthMethod] }) : /* @__PURE__ */ jsx8("span", { fg: "#ff4444", children: "\u2717" }) })
|
|
15804
15899
|
] })
|
|
15805
15900
|
] }),
|
|
15806
15901
|
/* @__PURE__ */ jsx8(Section, { title: "View", children: (() => {
|
|
@@ -15832,7 +15927,7 @@ function WorkspaceInfo({ status, workspaceName, workspaceId, focused, loading, a
|
|
|
15832
15927
|
const isActive = viewMode === "diff" && viewingDiffRepoName === item.repoName;
|
|
15833
15928
|
const cursorOn = isHighlighted(item);
|
|
15834
15929
|
const bg = cursorOn ? "#1a2a1a" : isActive ? "#0d2b0d" : "#111111";
|
|
15835
|
-
const nameColor = isActive || cursorOn ? "#
|
|
15930
|
+
const nameColor = isActive || cursorOn ? "#3eeba3" : "#cccccc";
|
|
15836
15931
|
return /* @__PURE__ */ jsxs8(
|
|
15837
15932
|
"box",
|
|
15838
15933
|
{
|
|
@@ -15844,11 +15939,11 @@ function WorkspaceInfo({ status, workspaceName, workspaceId, focused, loading, a
|
|
|
15844
15939
|
justifyContent: "space-between",
|
|
15845
15940
|
children: [
|
|
15846
15941
|
/* @__PURE__ */ jsxs8("text", { children: [
|
|
15847
|
-
/* @__PURE__ */ jsx8("span", { fg: isActive ? "#
|
|
15942
|
+
/* @__PURE__ */ jsx8("span", { fg: isActive ? "#3eeba3" : "#555555", children: isActive ? " \u25B8 " : " \u2514 " }),
|
|
15848
15943
|
isActive ? /* @__PURE__ */ jsx8("span", { fg: nameColor, children: /* @__PURE__ */ jsx8("strong", { children: item.repoName }) }) : /* @__PURE__ */ jsx8("span", { fg: nameColor, children: item.repoName })
|
|
15849
15944
|
] }),
|
|
15850
15945
|
/* @__PURE__ */ jsxs8("text", { children: [
|
|
15851
|
-
item.added > 0 && /* @__PURE__ */ jsxs8("span", { fg: "#
|
|
15946
|
+
item.added > 0 && /* @__PURE__ */ jsxs8("span", { fg: "#3eeba3", children: [
|
|
15852
15947
|
"+",
|
|
15853
15948
|
item.added
|
|
15854
15949
|
] }),
|
|
@@ -15887,7 +15982,7 @@ function WorkspaceInfo({ status, workspaceName, workspaceId, focused, loading, a
|
|
|
15887
15982
|
":",
|
|
15888
15983
|
preview2.port
|
|
15889
15984
|
] }) }),
|
|
15890
|
-
/* @__PURE__ */ jsx8("text", { children: /* @__PURE__ */ jsx8("span", { fg: previewItem && isHighlighted(previewItem) ? "#
|
|
15985
|
+
/* @__PURE__ */ jsx8("text", { children: /* @__PURE__ */ jsx8("span", { fg: previewItem && isHighlighted(previewItem) ? "#3eeba3" : "#7dcfff", children: "\u2197" }) })
|
|
15891
15986
|
]
|
|
15892
15987
|
},
|
|
15893
15988
|
i
|
|
@@ -15904,7 +15999,7 @@ function WorkspaceInfo({ status, workspaceName, workspaceId, focused, loading, a
|
|
|
15904
15999
|
"\u2514",
|
|
15905
16000
|
" "
|
|
15906
16001
|
] }),
|
|
15907
|
-
/* @__PURE__ */ jsx8("span", { fg: repo.currentBranch !== repo.defaultBranch ? "#ffaa00" : "#
|
|
16002
|
+
/* @__PURE__ */ jsx8("span", { fg: repo.currentBranch !== repo.defaultBranch ? "#ffaa00" : "#3eeba3", children: repo.currentBranch })
|
|
15908
16003
|
] }) }),
|
|
15909
16004
|
prItems.map((prItem) => /* @__PURE__ */ jsx8(
|
|
15910
16005
|
InteractiveRow,
|
|
@@ -15985,8 +16080,8 @@ function ToastProvider({ children }) {
|
|
|
15985
16080
|
// src/interactive/components/Toast.tsx
|
|
15986
16081
|
import { jsx as jsx10 } from "@opentui/react/jsx-runtime";
|
|
15987
16082
|
var VARIANT_COLORS = {
|
|
15988
|
-
info: { border: "#
|
|
15989
|
-
success: { border: "#
|
|
16083
|
+
info: { border: "#3eeba3", bg: "#0a1f17" },
|
|
16084
|
+
success: { border: "#3eeba3", bg: "#0a1f17" },
|
|
15990
16085
|
warning: { border: "#ffaa00", bg: "#1a1a0a" },
|
|
15991
16086
|
error: { border: "#ff4444", bg: "#1a0a0a" }
|
|
15992
16087
|
};
|
|
@@ -16354,7 +16449,7 @@ function AppInner() {
|
|
|
16354
16449
|
flexGrow: 1,
|
|
16355
16450
|
border: true,
|
|
16356
16451
|
borderStyle: "rounded",
|
|
16357
|
-
borderColor: focusPanel !== "sidebar" && focusPanel !== "info" ? "#
|
|
16452
|
+
borderColor: focusPanel !== "sidebar" && focusPanel !== "info" ? "#3eeba3" : "#333333",
|
|
16358
16453
|
backgroundColor: "#000000",
|
|
16359
16454
|
flexDirection: "column",
|
|
16360
16455
|
title: "Diff",
|
|
@@ -16396,7 +16491,7 @@ function AppInner() {
|
|
|
16396
16491
|
] }),
|
|
16397
16492
|
/* @__PURE__ */ jsxs9("text", { fg: "#555555", children: [
|
|
16398
16493
|
"Press ",
|
|
16399
|
-
/* @__PURE__ */ jsx11("span", { fg: "#
|
|
16494
|
+
/* @__PURE__ */ jsx11("span", { fg: "#3eeba3", children: /* @__PURE__ */ jsx11("strong", { children: "w" }) }),
|
|
16400
16495
|
" to wake it up"
|
|
16401
16496
|
] })
|
|
16402
16497
|
]
|