replicas-cli 0.2.42 → 0.2.44

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.
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bun
2
2
  import {
3
+ SOURCE_CONFIG,
3
4
  buildGroups,
4
5
  createMockWorkspaceRecord,
5
6
  createUserMessage,
@@ -8,15 +9,16 @@ import {
8
9
  getOrganizationId,
9
10
  getValidToken,
10
11
  isAgentBackendEvent,
11
- parseAgentEvents
12
- } from "./chunk-IO4QHXPW.mjs";
12
+ parseAgentEvents,
13
+ parseUserMessage
14
+ } from "./chunk-36GR2SO3.mjs";
13
15
 
14
16
  // src/interactive/index.tsx
15
17
  import { createCliRenderer } from "@opentui/core";
16
18
  import { createRoot } from "@opentui/react";
17
19
 
18
20
  // src/interactive/App.tsx
19
- import { useState as useState6, useEffect as useEffect3, useMemo as useMemo4, useCallback as useCallback6, useRef as useRef3 } from "react";
21
+ import { useState as useState7, useEffect as useEffect3, useMemo as useMemo5, useCallback as useCallback6, useRef as useRef3 } from "react";
20
22
  import { useKeyboard as useKeyboard4, useRenderer, useTerminalDimensions as useTerminalDimensions3 } from "@opentui/react";
21
23
  import { QueryClient } from "@tanstack/react-query";
22
24
 
@@ -852,7 +854,7 @@ import { useRef, useEffect as useEffect2 } from "react";
852
854
  import { useKeyboard as useKeyboard2 } from "@opentui/react";
853
855
 
854
856
  // src/interactive/components/ChatMessage.tsx
855
- import { useState as useState3 } from "react";
857
+ import { useState as useState4, useMemo as useMemo3 } from "react";
856
858
  import { SyntaxStyle } from "@opentui/core";
857
859
 
858
860
  // src/interactive/components/Spinner.tsx
@@ -867,8 +869,178 @@ function SpinnerLabel({ color, label }) {
867
869
  ] });
868
870
  }
869
871
 
872
+ // src/interactive/components/StructuredUserMessage.tsx
873
+ import { useState as useState3 } from "react";
874
+ import { Fragment, jsx as jsx4, jsxs as jsxs4 } from "@opentui/react/jsx-runtime";
875
+ function SourceBadge({ source }) {
876
+ const config = SOURCE_CONFIG[source];
877
+ return /* @__PURE__ */ jsx4("text", { children: /* @__PURE__ */ jsx4("span", { fg: "#000000", bg: config.color, children: ` ${config.label} ` }) });
878
+ }
879
+ function MetadataPill({ label, value }) {
880
+ return /* @__PURE__ */ jsx4("text", { children: label ? /* @__PURE__ */ jsxs4(Fragment, { children: [
881
+ /* @__PURE__ */ jsxs4("span", { fg: "#888888", children: [
882
+ label,
883
+ ": "
884
+ ] }),
885
+ /* @__PURE__ */ jsx4("span", { fg: "#cccccc", children: value })
886
+ ] }) : /* @__PURE__ */ jsx4("span", { fg: "#cccccc", children: value }) });
887
+ }
888
+ function MessageBody({ children }) {
889
+ if (!children) return null;
890
+ return /* @__PURE__ */ jsx4("text", { fg: "#ffffff", selectable: true, children });
891
+ }
892
+ function ExpandableSection({ label, children }) {
893
+ const [expanded, setExpanded] = useState3(false);
894
+ if (!children) return null;
895
+ return /* @__PURE__ */ jsxs4("box", { flexDirection: "column", children: [
896
+ /* @__PURE__ */ jsx4("box", { onMouseDown: () => setExpanded((e) => !e), children: /* @__PURE__ */ jsxs4("text", { children: [
897
+ /* @__PURE__ */ jsxs4("span", { fg: "#555555", children: [
898
+ expanded ? "\u25BE" : "\u25B8",
899
+ " "
900
+ ] }),
901
+ /* @__PURE__ */ jsx4("span", { fg: "#888888", children: label })
902
+ ] }) }),
903
+ expanded && /* @__PURE__ */ jsx4("box", { paddingLeft: 2, children: /* @__PURE__ */ jsx4("text", { fg: "#888888", selectable: true, children }) })
904
+ ] });
905
+ }
906
+ function CIFailureMessage({ data }) {
907
+ return /* @__PURE__ */ jsxs4("box", { flexDirection: "column", gap: 0, children: [
908
+ /* @__PURE__ */ jsxs4("box", { flexDirection: "row", gap: 1, children: [
909
+ /* @__PURE__ */ jsx4(SourceBadge, { source: "ci_failure" }),
910
+ /* @__PURE__ */ jsx4(MetadataPill, { label: "PR", value: `#${data.prNumber}` }),
911
+ /* @__PURE__ */ jsx4(MetadataPill, { label: "Workflow", value: data.workflowName }),
912
+ /* @__PURE__ */ jsx4(MetadataPill, { label: "Status", value: data.conclusion })
913
+ ] }),
914
+ /* @__PURE__ */ jsxs4("text", { fg: "#ffffff", children: [
915
+ "Workflow ",
916
+ /* @__PURE__ */ jsx4("span", { fg: "#ff4444", children: data.conclusionText }),
917
+ " on PR #" + data.prNumber
918
+ ] }),
919
+ data.workflowFile && /* @__PURE__ */ jsx4(MetadataPill, { label: "File", value: data.workflowFile }),
920
+ data.runUrl && /* @__PURE__ */ jsx4(MetadataPill, { label: "Run", value: data.runUrl })
921
+ ] });
922
+ }
923
+ function LinearIssueMessage({ data }) {
924
+ return /* @__PURE__ */ jsxs4("box", { flexDirection: "column", gap: 0, children: [
925
+ /* @__PURE__ */ jsxs4("box", { flexDirection: "row", gap: 1, children: [
926
+ /* @__PURE__ */ jsx4(SourceBadge, { source: "linear_issue" }),
927
+ /* @__PURE__ */ jsx4(MetadataPill, { label: "", value: data.identifier })
928
+ ] }),
929
+ /* @__PURE__ */ jsx4("text", { fg: "#ffffff", children: /* @__PURE__ */ jsx4("strong", { children: data.title }) }),
930
+ data.description && data.description !== "No description provided." && /* @__PURE__ */ jsx4(MessageBody, { children: data.description }),
931
+ /* @__PURE__ */ jsx4(ExpandableSection, { label: "Additional context", children: data.additionalContext }),
932
+ data.parentIssue && /* @__PURE__ */ jsx4(ExpandableSection, { label: `Parent: ${data.parentIssue.identifier} - ${data.parentIssue.title}`, children: data.parentIssue.description })
933
+ ] });
934
+ }
935
+ function GitHubIssueNewMessage({ data }) {
936
+ return /* @__PURE__ */ jsxs4("box", { flexDirection: "column", gap: 0, children: [
937
+ /* @__PURE__ */ jsxs4("box", { flexDirection: "row", gap: 1, children: [
938
+ /* @__PURE__ */ jsx4(SourceBadge, { source: "github_issue_new" }),
939
+ /* @__PURE__ */ jsx4(MetadataPill, { label: "Issue", value: `#${data.issueNumber}` }),
940
+ data.triggeringUser && /* @__PURE__ */ jsx4(MetadataPill, { label: "From", value: `@${data.triggeringUser}` })
941
+ ] }),
942
+ /* @__PURE__ */ jsx4("text", { fg: "#ffffff", children: /* @__PURE__ */ jsx4("strong", { children: data.issueTitle }) }),
943
+ data.triggeringComment && /* @__PURE__ */ jsx4(MessageBody, { children: data.triggeringComment }),
944
+ /* @__PURE__ */ jsx4(ExpandableSection, { label: "Issue description", children: data.issueDescription })
945
+ ] });
946
+ }
947
+ function GitHubIssueExistingMessage({ data }) {
948
+ return /* @__PURE__ */ jsxs4("box", { flexDirection: "column", gap: 0, children: [
949
+ /* @__PURE__ */ jsxs4("box", { flexDirection: "row", gap: 1, children: [
950
+ /* @__PURE__ */ jsx4(SourceBadge, { source: "github_issue_existing" }),
951
+ /* @__PURE__ */ jsx4(MetadataPill, { label: "Issue", value: `#${data.issueNumber}` }),
952
+ data.commentUser && /* @__PURE__ */ jsx4(MetadataPill, { label: "From", value: `@${data.commentUser}` })
953
+ ] }),
954
+ /* @__PURE__ */ jsx4(MessageBody, { children: data.commentBody })
955
+ ] });
956
+ }
957
+ function GitHubPRNewMessage({ data }) {
958
+ return /* @__PURE__ */ jsxs4("box", { flexDirection: "column", gap: 0, children: [
959
+ /* @__PURE__ */ jsxs4("box", { flexDirection: "row", gap: 1, children: [
960
+ /* @__PURE__ */ jsx4(SourceBadge, { source: "github_pr_new" }),
961
+ /* @__PURE__ */ jsx4(MetadataPill, { label: "PR", value: `#${data.prNumber}` }),
962
+ data.mentioningUser && /* @__PURE__ */ jsx4(MetadataPill, { label: "From", value: `@${data.mentioningUser}` })
963
+ ] }),
964
+ /* @__PURE__ */ jsx4(MessageBody, { children: data.contextMessage })
965
+ ] });
966
+ }
967
+ function GitHubPRCodeReviewMessage({ data }) {
968
+ return /* @__PURE__ */ jsxs4("box", { flexDirection: "column", gap: 0, children: [
969
+ /* @__PURE__ */ jsxs4("box", { flexDirection: "row", gap: 1, children: [
970
+ /* @__PURE__ */ jsx4(SourceBadge, { source: "github_pr_existing_review" }),
971
+ /* @__PURE__ */ jsx4(MetadataPill, { label: "PR", value: `#${data.prNumber}` }),
972
+ data.commentUser && /* @__PURE__ */ jsx4(MetadataPill, { label: "From", value: `@${data.commentUser}` }),
973
+ data.filePath && /* @__PURE__ */ jsx4(MetadataPill, { label: "File", value: data.filePath })
974
+ ] }),
975
+ /* @__PURE__ */ jsx4(MessageBody, { children: data.commentBody }),
976
+ /* @__PURE__ */ jsx4(ExpandableSection, { label: "Diff context", children: data.diffHunk })
977
+ ] });
978
+ }
979
+ function GitHubPRReviewMessage({ data }) {
980
+ return /* @__PURE__ */ jsxs4("box", { flexDirection: "column", gap: 0, children: [
981
+ /* @__PURE__ */ jsxs4("box", { flexDirection: "row", gap: 1, children: [
982
+ /* @__PURE__ */ jsx4(SourceBadge, { source: "github_pr_existing_pr_review" }),
983
+ /* @__PURE__ */ jsx4(MetadataPill, { label: "PR", value: `#${data.prNumber}` }),
984
+ data.reviewUser && /* @__PURE__ */ jsx4(MetadataPill, { label: "From", value: `@${data.reviewUser}` })
985
+ ] }),
986
+ /* @__PURE__ */ jsxs4("text", { fg: "#888888", children: [
987
+ "@" + data.reviewUser + " ",
988
+ /* @__PURE__ */ jsx4("span", { fg: "#ffffff", children: data.reviewAction })
989
+ ] }),
990
+ data.commentBody && /* @__PURE__ */ jsx4(MessageBody, { children: data.commentBody })
991
+ ] });
992
+ }
993
+ function GitHubPRGeneralMessage({ data }) {
994
+ return /* @__PURE__ */ jsxs4("box", { flexDirection: "column", gap: 0, children: [
995
+ /* @__PURE__ */ jsxs4("box", { flexDirection: "row", gap: 1, children: [
996
+ /* @__PURE__ */ jsx4(SourceBadge, { source: "github_pr_existing_general" }),
997
+ /* @__PURE__ */ jsx4(MetadataPill, { label: "PR", value: `#${data.prNumber}` }),
998
+ data.commentUser && /* @__PURE__ */ jsx4(MetadataPill, { label: "From", value: `@${data.commentUser}` })
999
+ ] }),
1000
+ /* @__PURE__ */ jsx4(MessageBody, { children: data.commentBody })
1001
+ ] });
1002
+ }
1003
+ function SlackTaskMessage({ data }) {
1004
+ const hasDistinctContext = data.threadContext && data.threadContext !== `@${data.latestMessageUser}: ${data.latestMessageText}`;
1005
+ return /* @__PURE__ */ jsxs4("box", { flexDirection: "column", gap: 0, children: [
1006
+ /* @__PURE__ */ jsxs4("box", { flexDirection: "row", gap: 1, children: [
1007
+ /* @__PURE__ */ jsx4(SourceBadge, { source: "slack_task" }),
1008
+ data.workspaceTarget && /* @__PURE__ */ jsx4(MetadataPill, { label: "Target", value: data.workspaceTarget }),
1009
+ data.latestMessageUser && /* @__PURE__ */ jsx4(MetadataPill, { label: "From", value: `@${data.latestMessageUser}` })
1010
+ ] }),
1011
+ /* @__PURE__ */ jsx4(MessageBody, { children: data.latestMessageText }),
1012
+ hasDistinctContext && /* @__PURE__ */ jsx4(ExpandableSection, { label: "Thread context", children: data.threadContext })
1013
+ ] });
1014
+ }
1015
+ function StructuredUserMessage({ parsed }) {
1016
+ switch (parsed.source) {
1017
+ case "ci_failure":
1018
+ return /* @__PURE__ */ jsx4(CIFailureMessage, { data: parsed });
1019
+ case "linear_issue":
1020
+ return /* @__PURE__ */ jsx4(LinearIssueMessage, { data: parsed });
1021
+ case "github_issue_new":
1022
+ return /* @__PURE__ */ jsx4(GitHubIssueNewMessage, { data: parsed });
1023
+ case "github_issue_existing":
1024
+ return /* @__PURE__ */ jsx4(GitHubIssueExistingMessage, { data: parsed });
1025
+ case "github_pr_new":
1026
+ return /* @__PURE__ */ jsx4(GitHubPRNewMessage, { data: parsed });
1027
+ case "github_pr_existing_review":
1028
+ return /* @__PURE__ */ jsx4(GitHubPRCodeReviewMessage, { data: parsed });
1029
+ case "github_pr_existing_pr_review":
1030
+ return /* @__PURE__ */ jsx4(GitHubPRReviewMessage, { data: parsed });
1031
+ case "github_pr_existing_general":
1032
+ return /* @__PURE__ */ jsx4(GitHubPRGeneralMessage, { data: parsed });
1033
+ case "slack_task":
1034
+ return /* @__PURE__ */ jsx4(SlackTaskMessage, { data: parsed });
1035
+ default: {
1036
+ const _exhaustive = parsed;
1037
+ throw new Error(`Unhandled prompt source: ${_exhaustive.source}`);
1038
+ }
1039
+ }
1040
+ }
1041
+
870
1042
  // src/interactive/components/ChatMessage.tsx
871
- import { jsx as jsx4, jsxs as jsxs4 } from "@opentui/react/jsx-runtime";
1043
+ import { Fragment as Fragment2, jsx as jsx5, jsxs as jsxs5 } from "@opentui/react/jsx-runtime";
872
1044
  var sharedSyntaxStyle = null;
873
1045
  function getSyntaxStyle() {
874
1046
  if (!sharedSyntaxStyle) {
@@ -906,15 +1078,15 @@ function truncate2(text, maxLen) {
906
1078
  return text.length > maxLen ? text.slice(0, maxLen - 1) + "\u2026" : text;
907
1079
  }
908
1080
  function StatusIcon({ status }) {
909
- if (status === "completed") return /* @__PURE__ */ jsxs4("span", { fg: "#66bb6a", children: [
1081
+ if (status === "completed") return /* @__PURE__ */ jsxs5("span", { fg: "#66bb6a", children: [
910
1082
  " ",
911
1083
  "\u2713"
912
1084
  ] });
913
- if (status === "failed") return /* @__PURE__ */ jsxs4("span", { fg: "#ff4444", children: [
1085
+ if (status === "failed") return /* @__PURE__ */ jsxs5("span", { fg: "#ff4444", children: [
914
1086
  " ",
915
1087
  "\u2717"
916
1088
  ] });
917
- if (status === "in_progress") return /* @__PURE__ */ jsxs4("span", { fg: "#ffaa00", children: [
1089
+ if (status === "in_progress") return /* @__PURE__ */ jsxs5("span", { fg: "#ffaa00", children: [
918
1090
  " ",
919
1091
  "\u2026"
920
1092
  ] });
@@ -928,7 +1100,7 @@ function ActionLine({
928
1100
  onToggle,
929
1101
  expanded
930
1102
  }) {
931
- return /* @__PURE__ */ jsxs4(
1103
+ return /* @__PURE__ */ jsxs5(
932
1104
  "box",
933
1105
  {
934
1106
  paddingX: 1,
@@ -936,15 +1108,15 @@ function ActionLine({
936
1108
  justifyContent: "space-between",
937
1109
  onMouseDown: onToggle,
938
1110
  children: [
939
- /* @__PURE__ */ jsxs4("text", { children: [
940
- /* @__PURE__ */ jsx4("span", { fg: "#ffffff", children: /* @__PURE__ */ jsx4("strong", { children: label }) }),
941
- /* @__PURE__ */ jsxs4("span", { fg: "#cccccc", children: [
1111
+ /* @__PURE__ */ jsxs5("text", { children: [
1112
+ /* @__PURE__ */ jsx5("span", { fg: "#ffffff", children: /* @__PURE__ */ jsx5("strong", { children: label }) }),
1113
+ /* @__PURE__ */ jsxs5("span", { fg: "#cccccc", children: [
942
1114
  " ",
943
1115
  arg.replace(/\n/g, " ").replace(/\s+/g, " ")
944
1116
  ] }),
945
- /* @__PURE__ */ jsx4(StatusIcon, { status })
1117
+ /* @__PURE__ */ jsx5(StatusIcon, { status })
946
1118
  ] }),
947
- expandable && /* @__PURE__ */ jsx4("text", { children: /* @__PURE__ */ jsx4("span", { fg: "#555555", children: expanded ? "\u25BE" : "\u25B8" }) })
1119
+ expandable && /* @__PURE__ */ jsx5("text", { children: /* @__PURE__ */ jsx5("span", { fg: "#555555", children: expanded ? "\u25BE" : "\u25B8" }) })
948
1120
  ]
949
1121
  }
950
1122
  );
@@ -955,9 +1127,9 @@ function ExpandableAction({
955
1127
  status,
956
1128
  children
957
1129
  }) {
958
- const [expanded, setExpanded] = useState3(false);
959
- return /* @__PURE__ */ jsxs4("box", { flexDirection: "column", children: [
960
- /* @__PURE__ */ jsx4(
1130
+ const [expanded, setExpanded] = useState4(false);
1131
+ return /* @__PURE__ */ jsxs5("box", { flexDirection: "column", children: [
1132
+ /* @__PURE__ */ jsx5(
961
1133
  ActionLine,
962
1134
  {
963
1135
  label,
@@ -971,30 +1143,38 @@ function ExpandableAction({
971
1143
  expanded && children
972
1144
  ] });
973
1145
  }
1146
+ function isStructuredPrompt(p) {
1147
+ return p.source !== "raw";
1148
+ }
1149
+ function UserMessageContent({ content }) {
1150
+ const parsed = useMemo3(() => parseUserMessage(content), [content]);
1151
+ return /* @__PURE__ */ jsx5(
1152
+ "box",
1153
+ {
1154
+ flexDirection: "column",
1155
+ backgroundColor: "#151515",
1156
+ paddingX: 2,
1157
+ paddingY: 1,
1158
+ marginX: 1,
1159
+ children: isStructuredPrompt(parsed) ? /* @__PURE__ */ jsx5(StructuredUserMessage, { parsed }) : /* @__PURE__ */ jsxs5(Fragment2, { children: [
1160
+ /* @__PURE__ */ jsx5("text", { children: /* @__PURE__ */ jsx5("span", { fg: "#66bb6a", children: /* @__PURE__ */ jsx5("strong", { children: "You" }) }) }),
1161
+ /* @__PURE__ */ jsx5("text", { fg: "#ffffff", selectable: true, children: content })
1162
+ ] })
1163
+ }
1164
+ );
1165
+ }
974
1166
  function ChatMessage({ message, provider }) {
975
1167
  switch (message.type) {
976
- case "user":
1168
+ case "user": {
977
1169
  if (message.content === "Request interrupted") {
978
- return /* @__PURE__ */ jsx4("box", { paddingX: 1, justifyContent: "center", children: /* @__PURE__ */ jsx4("text", { fg: "#555555", children: "--- Request interrupted ---" }) });
1170
+ return /* @__PURE__ */ jsx5("box", { paddingX: 1, justifyContent: "center", children: /* @__PURE__ */ jsx5("text", { fg: "#555555", children: "--- Request interrupted ---" }) });
979
1171
  }
980
- return /* @__PURE__ */ jsxs4(
981
- "box",
982
- {
983
- flexDirection: "column",
984
- backgroundColor: "#151515",
985
- paddingX: 2,
986
- paddingY: 1,
987
- marginX: 1,
988
- children: [
989
- /* @__PURE__ */ jsx4("text", { children: /* @__PURE__ */ jsx4("span", { fg: "#66bb6a", children: /* @__PURE__ */ jsx4("strong", { children: "You" }) }) }),
990
- /* @__PURE__ */ jsx4("text", { fg: "#ffffff", selectable: true, children: message.content })
991
- ]
992
- }
993
- );
1172
+ return /* @__PURE__ */ jsx5(UserMessageContent, { content: message.content });
1173
+ }
994
1174
  case "agent":
995
- return /* @__PURE__ */ jsxs4("box", { flexDirection: "column", paddingX: 1, children: [
996
- /* @__PURE__ */ jsx4("text", { children: /* @__PURE__ */ jsx4("span", { fg: "#66bb6a", children: /* @__PURE__ */ jsx4("strong", { children: AGENT_LABELS[provider] }) }) }),
997
- /* @__PURE__ */ jsx4(
1175
+ return /* @__PURE__ */ jsxs5("box", { flexDirection: "column", paddingX: 1, children: [
1176
+ /* @__PURE__ */ jsx5("text", { children: /* @__PURE__ */ jsx5("span", { fg: "#66bb6a", children: /* @__PURE__ */ jsx5("strong", { children: AGENT_LABELS[provider] }) }) }),
1177
+ /* @__PURE__ */ jsx5(
998
1178
  "markdown",
999
1179
  {
1000
1180
  content: message.content,
@@ -1007,26 +1187,26 @@ function ChatMessage({ message, provider }) {
1007
1187
  )
1008
1188
  ] });
1009
1189
  case "reasoning":
1010
- return /* @__PURE__ */ jsx4("box", { paddingX: 1, children: /* @__PURE__ */ jsx4(SpinnerLabel, { color: "#555555", label: "thinking" }) });
1190
+ return /* @__PURE__ */ jsx5("box", { paddingX: 1, children: /* @__PURE__ */ jsx5(SpinnerLabel, { color: "#555555", label: "thinking" }) });
1011
1191
  case "command": {
1012
1192
  const cmdArg = truncate2(message.command, 60);
1013
1193
  const exitSuffix = message.exitCode !== void 0 && message.exitCode !== 0 ? ` (exit ${message.exitCode})` : "";
1014
1194
  if (!message.output) {
1015
- return /* @__PURE__ */ jsx4(ActionLine, { label: "Command", arg: cmdArg + exitSuffix, status: message.status });
1195
+ return /* @__PURE__ */ jsx5(ActionLine, { label: "Command", arg: cmdArg + exitSuffix, status: message.status });
1016
1196
  }
1017
- return /* @__PURE__ */ jsx4(ExpandableAction, { label: "Command", arg: cmdArg + exitSuffix, status: message.status, children: /* @__PURE__ */ jsx4("box", { paddingLeft: 2, paddingX: 1, children: /* @__PURE__ */ jsx4("text", { fg: "#888888", selectable: true, children: message.output.length > 500 ? message.output.slice(0, 500) + "\n\u2026" : message.output }) }) });
1197
+ return /* @__PURE__ */ jsx5(ExpandableAction, { label: "Command", arg: cmdArg + exitSuffix, status: message.status, children: /* @__PURE__ */ jsx5("box", { paddingLeft: 2, paddingX: 1, children: /* @__PURE__ */ jsx5("text", { fg: "#888888", selectable: true, children: message.output.length > 500 ? message.output.slice(0, 500) + "\n\u2026" : message.output }) }) });
1018
1198
  }
1019
1199
  case "file_change": {
1020
1200
  const count = message.changes.length;
1021
- return /* @__PURE__ */ jsx4(ExpandableAction, { label: "Files", arg: `${count}`, status: message.status, children: /* @__PURE__ */ jsx4("box", { flexDirection: "column", paddingLeft: 2, paddingX: 1, children: message.changes.map((change, i) => /* @__PURE__ */ jsxs4("text", { children: [
1022
- /* @__PURE__ */ jsx4(
1201
+ return /* @__PURE__ */ jsx5(ExpandableAction, { label: "Files", arg: `${count}`, status: message.status, children: /* @__PURE__ */ jsx5("box", { flexDirection: "column", paddingLeft: 2, paddingX: 1, children: message.changes.map((change, i) => /* @__PURE__ */ jsxs5("text", { children: [
1202
+ /* @__PURE__ */ jsx5(
1023
1203
  "span",
1024
1204
  {
1025
1205
  fg: change.kind === "add" ? "#66bb6a" : change.kind === "delete" ? "#ff4444" : "#ffaa00",
1026
1206
  children: change.kind === "add" ? "+" : change.kind === "delete" ? "-" : "~"
1027
1207
  }
1028
1208
  ),
1029
- /* @__PURE__ */ jsxs4("span", { fg: "#cccccc", children: [
1209
+ /* @__PURE__ */ jsxs5("span", { fg: "#cccccc", children: [
1030
1210
  " ",
1031
1211
  change.path
1032
1212
  ] })
@@ -1035,29 +1215,29 @@ function ChatMessage({ message, provider }) {
1035
1215
  case "tool_call": {
1036
1216
  const toolArg = truncate2(message.tool, 50);
1037
1217
  if (message.output || message.input) {
1038
- return /* @__PURE__ */ jsx4(ExpandableAction, { label: "Tool", arg: toolArg, status: message.status, children: /* @__PURE__ */ jsxs4("box", { flexDirection: "column", paddingLeft: 2, paddingX: 1, children: [
1039
- message.input && /* @__PURE__ */ jsx4("text", { fg: "#888888", selectable: true, children: typeof message.input === "string" ? truncate2(message.input, 300) : truncate2(JSON.stringify(message.input, null, 2), 300) }),
1040
- message.output && /* @__PURE__ */ jsx4("text", { fg: "#888888", selectable: true, children: truncate2(message.output, 300) })
1218
+ return /* @__PURE__ */ jsx5(ExpandableAction, { label: "Tool", arg: toolArg, status: message.status, children: /* @__PURE__ */ jsxs5("box", { flexDirection: "column", paddingLeft: 2, paddingX: 1, children: [
1219
+ message.input && /* @__PURE__ */ jsx5("text", { fg: "#888888", selectable: true, children: typeof message.input === "string" ? truncate2(message.input, 300) : truncate2(JSON.stringify(message.input, null, 2), 300) }),
1220
+ message.output && /* @__PURE__ */ jsx5("text", { fg: "#888888", selectable: true, children: truncate2(message.output, 300) })
1041
1221
  ] }) });
1042
1222
  }
1043
- return /* @__PURE__ */ jsx4(ActionLine, { label: "Tool", arg: toolArg, status: message.status });
1223
+ return /* @__PURE__ */ jsx5(ActionLine, { label: "Tool", arg: toolArg, status: message.status });
1044
1224
  }
1045
1225
  case "web_search":
1046
- return /* @__PURE__ */ jsx4(ActionLine, { label: "Search", arg: truncate2(message.query, 50), status: message.status });
1226
+ return /* @__PURE__ */ jsx5(ActionLine, { label: "Search", arg: truncate2(message.query, 50), status: message.status });
1047
1227
  case "todo_list": {
1048
1228
  const completed = message.items.filter((i) => i.completed).length;
1049
1229
  const total = message.items.length;
1050
- return /* @__PURE__ */ jsxs4("box", { flexDirection: "column", paddingX: 1, children: [
1051
- /* @__PURE__ */ jsx4("text", { children: /* @__PURE__ */ jsx4("span", { fg: "#888888", children: /* @__PURE__ */ jsxs4("strong", { children: [
1230
+ return /* @__PURE__ */ jsxs5("box", { flexDirection: "column", paddingX: 1, children: [
1231
+ /* @__PURE__ */ jsx5("text", { children: /* @__PURE__ */ jsx5("span", { fg: "#888888", children: /* @__PURE__ */ jsxs5("strong", { children: [
1052
1232
  "Plan (",
1053
1233
  completed,
1054
1234
  "/",
1055
1235
  total,
1056
1236
  ")"
1057
1237
  ] }) }) }),
1058
- message.items.map((item, i) => /* @__PURE__ */ jsxs4("text", { children: [
1059
- /* @__PURE__ */ jsx4("span", { fg: item.completed ? "#66bb6a" : "#555555", children: item.completed ? " \u2611" : " \u2610" }),
1060
- /* @__PURE__ */ jsxs4("span", { fg: "#ffffff", children: [
1238
+ message.items.map((item, i) => /* @__PURE__ */ jsxs5("text", { children: [
1239
+ /* @__PURE__ */ jsx5("span", { fg: item.completed ? "#66bb6a" : "#555555", children: item.completed ? " \u2611" : " \u2610" }),
1240
+ /* @__PURE__ */ jsxs5("span", { fg: "#ffffff", children: [
1061
1241
  " ",
1062
1242
  item.text
1063
1243
  ] })
@@ -1065,22 +1245,22 @@ function ChatMessage({ message, provider }) {
1065
1245
  ] });
1066
1246
  }
1067
1247
  case "subagent":
1068
- return /* @__PURE__ */ jsx4(ActionLine, { label: "Agent", arg: truncate2(message.description, 50), status: message.status });
1248
+ return /* @__PURE__ */ jsx5(ActionLine, { label: "Agent", arg: truncate2(message.description, 50), status: message.status });
1069
1249
  case "error":
1070
- return /* @__PURE__ */ jsx4("box", { paddingX: 1, children: /* @__PURE__ */ jsx4("text", { fg: "#ff4444", selectable: true, children: message.message }) });
1250
+ return /* @__PURE__ */ jsx5("box", { paddingX: 1, children: /* @__PURE__ */ jsx5("text", { fg: "#ff4444", selectable: true, children: message.message }) });
1071
1251
  case "skill":
1072
- return /* @__PURE__ */ jsx4(ActionLine, { label: "Skill", arg: message.skillName + (message.args ? ` ${message.args}` : ""), status: message.status });
1252
+ return /* @__PURE__ */ jsx5(ActionLine, { label: "Skill", arg: message.skillName + (message.args ? ` ${message.args}` : ""), status: message.status });
1073
1253
  case "patch": {
1074
1254
  const opCount = message.operations.length;
1075
- return /* @__PURE__ */ jsx4(ExpandableAction, { label: "Patch", arg: `${opCount}`, children: /* @__PURE__ */ jsx4("box", { flexDirection: "column", paddingLeft: 2, paddingX: 1, children: message.operations.map((op, i) => /* @__PURE__ */ jsxs4("text", { children: [
1076
- /* @__PURE__ */ jsx4(
1255
+ return /* @__PURE__ */ jsx5(ExpandableAction, { label: "Patch", arg: `${opCount}`, children: /* @__PURE__ */ jsx5("box", { flexDirection: "column", paddingLeft: 2, paddingX: 1, children: message.operations.map((op, i) => /* @__PURE__ */ jsxs5("text", { children: [
1256
+ /* @__PURE__ */ jsx5(
1077
1257
  "span",
1078
1258
  {
1079
1259
  fg: op.action === "add" ? "#66bb6a" : op.action === "delete" ? "#ff4444" : "#ffaa00",
1080
1260
  children: op.action === "add" ? "+" : op.action === "delete" ? "-" : "~"
1081
1261
  }
1082
1262
  ),
1083
- /* @__PURE__ */ jsxs4("span", { fg: "#cccccc", children: [
1263
+ /* @__PURE__ */ jsxs5("span", { fg: "#cccccc", children: [
1084
1264
  " ",
1085
1265
  op.path
1086
1266
  ] })
@@ -1092,7 +1272,7 @@ function ChatMessage({ message, provider }) {
1092
1272
  }
1093
1273
 
1094
1274
  // src/interactive/components/ChatArea.tsx
1095
- import { jsx as jsx5, jsxs as jsxs5 } from "@opentui/react/jsx-runtime";
1275
+ import { jsx as jsx6, jsxs as jsxs6 } from "@opentui/react/jsx-runtime";
1096
1276
  var textareaKeyBindings = [
1097
1277
  { name: "return", action: "submit" },
1098
1278
  { name: "return", shift: true, action: "newline" },
@@ -1183,7 +1363,7 @@ function ChatArea({
1183
1363
  }
1184
1364
  }
1185
1365
  });
1186
- return /* @__PURE__ */ jsxs5(
1366
+ return /* @__PURE__ */ jsxs6(
1187
1367
  "box",
1188
1368
  {
1189
1369
  flexGrow: 1,
@@ -1195,7 +1375,7 @@ function ChatArea({
1195
1375
  flexDirection: "column",
1196
1376
  backgroundColor: "#000000",
1197
1377
  children: [
1198
- chats.length > 1 && /* @__PURE__ */ jsx5(
1378
+ chats.length > 1 && /* @__PURE__ */ jsx6(
1199
1379
  "box",
1200
1380
  {
1201
1381
  height: 3,
@@ -1211,7 +1391,7 @@ function ChatArea({
1211
1391
  children: chats.map((chat) => {
1212
1392
  const isSelected = chat.id === selectedChatId;
1213
1393
  const label = `${chat.title}${chat.processing ? " ..." : ""}`;
1214
- return /* @__PURE__ */ jsx5(
1394
+ return /* @__PURE__ */ jsx6(
1215
1395
  "box",
1216
1396
  {
1217
1397
  backgroundColor: isSelected ? "#1a1a1a" : void 0,
@@ -1220,14 +1400,14 @@ function ChatArea({
1220
1400
  onSelectChat(chat.id);
1221
1401
  onFocus("chat-tabs");
1222
1402
  },
1223
- children: /* @__PURE__ */ jsx5("text", { children: /* @__PURE__ */ jsx5("span", { fg: isSelected ? modeColors.text : "#666666", children: label }) })
1403
+ children: /* @__PURE__ */ jsx6("text", { children: /* @__PURE__ */ jsx6("span", { fg: isSelected ? modeColors.text : "#666666", children: label }) })
1224
1404
  },
1225
1405
  chat.id
1226
1406
  );
1227
1407
  })
1228
1408
  }
1229
1409
  ),
1230
- /* @__PURE__ */ jsx5(
1410
+ /* @__PURE__ */ jsx6(
1231
1411
  "scrollbox",
1232
1412
  {
1233
1413
  ref: scrollboxRef,
@@ -1236,22 +1416,22 @@ function ChatArea({
1236
1416
  paddingX: 1,
1237
1417
  paddingY: 1,
1238
1418
  onMouseDown: () => onFocus("chat-history"),
1239
- children: loading ? /* @__PURE__ */ jsx5("box", { paddingX: 1, children: /* @__PURE__ */ jsx5("text", { fg: "#666666", children: "Loading messages..." }) }) : displayMessages.length === 0 ? /* @__PURE__ */ jsx5("box", { paddingX: 1, children: /* @__PURE__ */ jsx5("text", { fg: "#666666", children: "No messages yet. Send a message to start chatting." }) }) : (() => {
1419
+ children: loading ? /* @__PURE__ */ jsx6("box", { paddingX: 1, children: /* @__PURE__ */ jsx6("text", { fg: "#666666", children: "Loading messages..." }) }) : displayMessages.length === 0 ? /* @__PURE__ */ jsx6("box", { paddingX: 1, children: /* @__PURE__ */ jsx6("text", { fg: "#666666", children: "No messages yet. Send a message to start chatting." }) }) : (() => {
1240
1420
  const activeChat = chats.find((c) => c.id === selectedChatId);
1241
1421
  const provider = activeChat?.provider ?? "claude";
1242
1422
  const primaryTypes = /* @__PURE__ */ new Set(["user", "agent", "todo_list"]);
1243
1423
  return displayMessages.map((msg, i) => {
1244
1424
  const prev = i > 0 ? displayMessages[i - 1] : null;
1245
1425
  const needsSpacing = prev && (primaryTypes.has(msg.type) || primaryTypes.has(prev.type));
1246
- return /* @__PURE__ */ jsxs5("box", { flexDirection: "column", children: [
1247
- needsSpacing && /* @__PURE__ */ jsx5("box", { height: 1 }),
1248
- /* @__PURE__ */ jsx5(ChatMessage, { message: msg, provider })
1426
+ return /* @__PURE__ */ jsxs6("box", { flexDirection: "column", children: [
1427
+ needsSpacing && /* @__PURE__ */ jsx6("box", { height: 1 }),
1428
+ /* @__PURE__ */ jsx6(ChatMessage, { message: msg, provider })
1249
1429
  ] }, msg.id || `msg-${i}`);
1250
1430
  });
1251
1431
  })()
1252
1432
  }
1253
1433
  ),
1254
- /* @__PURE__ */ jsxs5(
1434
+ /* @__PURE__ */ jsxs6(
1255
1435
  "box",
1256
1436
  {
1257
1437
  flexDirection: "column",
@@ -1261,7 +1441,7 @@ function ChatArea({
1261
1441
  backgroundColor: "#111111",
1262
1442
  onMouseDown: () => onFocus("chat-input"),
1263
1443
  children: [
1264
- /* @__PURE__ */ jsx5("box", { height: 6, paddingX: 1, children: /* @__PURE__ */ jsx5(
1444
+ /* @__PURE__ */ jsx6("box", { height: 6, paddingX: 1, children: /* @__PURE__ */ jsx6(
1265
1445
  "textarea",
1266
1446
  {
1267
1447
  ref: textareaRef,
@@ -1276,7 +1456,7 @@ function ChatArea({
1276
1456
  height: 5
1277
1457
  }
1278
1458
  ) }),
1279
- /* @__PURE__ */ jsxs5(
1459
+ /* @__PURE__ */ jsxs6(
1280
1460
  "box",
1281
1461
  {
1282
1462
  height: 1,
@@ -1284,8 +1464,8 @@ function ChatArea({
1284
1464
  flexDirection: "row",
1285
1465
  justifyContent: "space-between",
1286
1466
  children: [
1287
- /* @__PURE__ */ jsx5("text", { children: /* @__PURE__ */ jsx5("span", { fg: modeColors.text, children: taskMode === "build" ? "Build" : "Plan" }) }),
1288
- isProcessing && /* @__PURE__ */ jsx5(SpinnerLabel, { color: "#ffaa00", label: "thinking" })
1467
+ /* @__PURE__ */ jsx6("text", { children: /* @__PURE__ */ jsx6("span", { fg: modeColors.text, children: taskMode === "build" ? "Build" : "Plan" }) }),
1468
+ isProcessing && /* @__PURE__ */ jsx6(SpinnerLabel, { color: "#ffaa00", label: "thinking" })
1289
1469
  ]
1290
1470
  }
1291
1471
  )
@@ -1298,10 +1478,10 @@ function ChatArea({
1298
1478
  }
1299
1479
 
1300
1480
  // src/interactive/components/WorkspaceInfo.tsx
1301
- import React4, { useState as useState4, useMemo as useMemo3, useCallback as useCallback4 } from "react";
1481
+ import React5, { useState as useState5, useMemo as useMemo4, useCallback as useCallback4 } from "react";
1302
1482
  import open from "open";
1303
1483
  import { useKeyboard as useKeyboard3 } from "@opentui/react";
1304
- import { Fragment, jsx as jsx6, jsxs as jsxs6 } from "@opentui/react/jsx-runtime";
1484
+ import { Fragment as Fragment3, jsx as jsx7, jsxs as jsxs7 } from "@opentui/react/jsx-runtime";
1305
1485
  var WEB_APP_URL = process.env.REPLICAS_WEB_URL || "https://replicas.dev";
1306
1486
  function buildInteractiveItems(workspaceId, status, previews, wakingWorkspaceId) {
1307
1487
  const items = [];
@@ -1345,24 +1525,24 @@ var AUTH_METHOD_LABELS = {
1345
1525
  };
1346
1526
  function StatusDot({ status }) {
1347
1527
  if (status === true || status === "yes") {
1348
- return /* @__PURE__ */ jsx6("span", { fg: "#66bb6a", children: "\u2713" });
1528
+ return /* @__PURE__ */ jsx7("span", { fg: "#66bb6a", children: "\u2713" });
1349
1529
  }
1350
1530
  if (status === false || status === "no") {
1351
- return /* @__PURE__ */ jsx6("span", { fg: "#ff4444", children: "\u2717" });
1531
+ return /* @__PURE__ */ jsx7("span", { fg: "#ff4444", children: "\u2717" });
1352
1532
  }
1353
- return /* @__PURE__ */ jsx6("span", { fg: "#555555", children: "-" });
1533
+ return /* @__PURE__ */ jsx7("span", { fg: "#555555", children: "-" });
1354
1534
  }
1355
1535
  function SectionLabel({ title }) {
1356
- return /* @__PURE__ */ jsx6("box", { backgroundColor: "#151515", paddingX: 1, children: /* @__PURE__ */ jsx6("text", { children: /* @__PURE__ */ jsx6("span", { fg: "#666666", children: /* @__PURE__ */ jsx6("strong", { children: title.toUpperCase() }) }) }) });
1536
+ return /* @__PURE__ */ jsx7("box", { backgroundColor: "#151515", paddingX: 1, children: /* @__PURE__ */ jsx7("text", { children: /* @__PURE__ */ jsx7("span", { fg: "#666666", children: /* @__PURE__ */ jsx7("strong", { children: title.toUpperCase() }) }) }) });
1357
1537
  }
1358
1538
  function Section({ title, children }) {
1359
- return /* @__PURE__ */ jsxs6("box", { flexDirection: "column", marginBottom: 1, children: [
1360
- /* @__PURE__ */ jsx6(SectionLabel, { title }),
1361
- /* @__PURE__ */ jsx6("box", { flexDirection: "column", backgroundColor: "#0a0a0a", children })
1539
+ return /* @__PURE__ */ jsxs7("box", { flexDirection: "column", marginBottom: 1, children: [
1540
+ /* @__PURE__ */ jsx7(SectionLabel, { title }),
1541
+ /* @__PURE__ */ jsx7("box", { flexDirection: "column", backgroundColor: "#0a0a0a", children })
1362
1542
  ] });
1363
1543
  }
1364
1544
  function CardItem({ label, status }) {
1365
- return /* @__PURE__ */ jsxs6(
1545
+ return /* @__PURE__ */ jsxs7(
1366
1546
  "box",
1367
1547
  {
1368
1548
  flexDirection: "row",
@@ -1371,8 +1551,8 @@ function CardItem({ label, status }) {
1371
1551
  backgroundColor: "#111111",
1372
1552
  marginBottom: 0,
1373
1553
  children: [
1374
- /* @__PURE__ */ jsx6("text", { children: /* @__PURE__ */ jsx6("span", { fg: "#cccccc", children: label }) }),
1375
- /* @__PURE__ */ jsx6("text", { children: /* @__PURE__ */ jsx6(StatusDot, { status }) })
1554
+ /* @__PURE__ */ jsx7("text", { children: /* @__PURE__ */ jsx7("span", { fg: "#cccccc", children: label }) }),
1555
+ /* @__PURE__ */ jsx7("text", { children: /* @__PURE__ */ jsx7(StatusDot, { status }) })
1376
1556
  ]
1377
1557
  }
1378
1558
  );
@@ -1385,23 +1565,23 @@ function DetailList({
1385
1565
  const actualSet = new Set(actual);
1386
1566
  const rows = uniqueExpected.length > 0 ? uniqueExpected : Array.from(actualSet).sort((a, b) => a.localeCompare(b));
1387
1567
  if (rows.length === 0) return null;
1388
- return /* @__PURE__ */ jsx6(Fragment, { children: rows.map((item, i) => /* @__PURE__ */ jsx6(CardItem, { label: item, status: actualSet.has(item) }, i)) });
1568
+ return /* @__PURE__ */ jsx7(Fragment3, { children: rows.map((item, i) => /* @__PURE__ */ jsx7(CardItem, { label: item, status: actualSet.has(item) }, i)) });
1389
1569
  }
1390
1570
  function InteractiveRow({ label, highlighted, onClick }) {
1391
- return /* @__PURE__ */ jsx6(
1571
+ return /* @__PURE__ */ jsx7(
1392
1572
  "box",
1393
1573
  {
1394
1574
  paddingX: 1,
1395
1575
  backgroundColor: highlighted ? "#1a2a1a" : "#111111",
1396
1576
  onMouseDown: onClick,
1397
- children: /* @__PURE__ */ jsx6("text", { children: /* @__PURE__ */ jsx6("span", { fg: highlighted ? "#66bb6a" : "#7dcfff", children: label }) })
1577
+ children: /* @__PURE__ */ jsx7("text", { children: /* @__PURE__ */ jsx7("span", { fg: highlighted ? "#66bb6a" : "#7dcfff", children: label }) })
1398
1578
  }
1399
1579
  );
1400
1580
  }
1401
1581
  function WorkspaceInfo({ status, workspaceName, workspaceId, focused, loading, envConfig, previews, onWakeWorkspace, wakingWorkspaceId }) {
1402
1582
  const borderColor = focused ? "#66bb6a" : "#333333";
1403
- const [cursorIndex, setCursorIndex] = useState4(0);
1404
- const interactiveItems = useMemo3(() => {
1583
+ const [cursorIndex, setCursorIndex] = useState5(0);
1584
+ const interactiveItems = useMemo4(() => {
1405
1585
  if (!status || !workspaceName) return [];
1406
1586
  return buildInteractiveItems(workspaceId, status, previews, wakingWorkspaceId);
1407
1587
  }, [workspaceId, workspaceName, status, previews, wakingWorkspaceId]);
@@ -1490,7 +1670,7 @@ function WorkspaceInfo({ status, workspaceName, workspaceId, focused, loading, e
1490
1670
  [interactiveItems]
1491
1671
  );
1492
1672
  if (!workspaceName) {
1493
- return /* @__PURE__ */ jsx6(
1673
+ return /* @__PURE__ */ jsx7(
1494
1674
  "box",
1495
1675
  {
1496
1676
  width: 30,
@@ -1502,12 +1682,12 @@ function WorkspaceInfo({ status, workspaceName, workspaceId, focused, loading, e
1502
1682
  flexDirection: "column",
1503
1683
  paddingX: 1,
1504
1684
  backgroundColor: "#000000",
1505
- children: /* @__PURE__ */ jsx6("text", { fg: "#666666", children: "Select a workspace" })
1685
+ children: /* @__PURE__ */ jsx7("text", { fg: "#666666", children: "Select a workspace" })
1506
1686
  }
1507
1687
  );
1508
1688
  }
1509
1689
  if (loading || !status) {
1510
- return /* @__PURE__ */ jsx6(
1690
+ return /* @__PURE__ */ jsx7(
1511
1691
  "box",
1512
1692
  {
1513
1693
  width: 30,
@@ -1519,7 +1699,7 @@ function WorkspaceInfo({ status, workspaceName, workspaceId, focused, loading, e
1519
1699
  flexDirection: "column",
1520
1700
  paddingX: 1,
1521
1701
  backgroundColor: "#000000",
1522
- children: /* @__PURE__ */ jsx6("text", { fg: "#666666", children: "Loading..." })
1702
+ children: /* @__PURE__ */ jsx7("text", { fg: "#666666", children: "Loading..." })
1523
1703
  }
1524
1704
  );
1525
1705
  }
@@ -1530,7 +1710,7 @@ function WorkspaceInfo({ status, workspaceName, workspaceId, focused, loading, e
1530
1710
  const expectedGlobalFiles = (envConfig.files?.environment_files ?? []).filter((f) => f.scope_type === "global").map((f) => f.path);
1531
1711
  const dashboardItem = findItem("dashboard");
1532
1712
  const wakeItem = findItem("wake");
1533
- return /* @__PURE__ */ jsx6(
1713
+ return /* @__PURE__ */ jsx7(
1534
1714
  "box",
1535
1715
  {
1536
1716
  width: 30,
@@ -1541,16 +1721,16 @@ function WorkspaceInfo({ status, workspaceName, workspaceId, focused, loading, e
1541
1721
  titleAlignment: "center",
1542
1722
  flexDirection: "column",
1543
1723
  backgroundColor: "#000000",
1544
- children: /* @__PURE__ */ jsxs6("scrollbox", { focused, flexGrow: 1, children: [
1545
- /* @__PURE__ */ jsx6("box", { backgroundColor: "#111111", paddingX: 1, marginBottom: 1, children: /* @__PURE__ */ jsxs6("box", { flexDirection: "column", children: [
1546
- /* @__PURE__ */ jsx6("text", { children: /* @__PURE__ */ jsx6("span", { fg: "#ffffff", children: /* @__PURE__ */ jsx6("strong", { children: workspaceName }) }) }),
1547
- /* @__PURE__ */ jsxs6("text", { children: [
1548
- /* @__PURE__ */ jsxs6("span", { fg: statusColor, children: [
1724
+ children: /* @__PURE__ */ jsxs7("scrollbox", { focused, flexGrow: 1, children: [
1725
+ /* @__PURE__ */ jsx7("box", { backgroundColor: "#111111", paddingX: 1, marginBottom: 1, children: /* @__PURE__ */ jsxs7("box", { flexDirection: "column", children: [
1726
+ /* @__PURE__ */ jsx7("text", { children: /* @__PURE__ */ jsx7("span", { fg: "#ffffff", children: /* @__PURE__ */ jsx7("strong", { children: workspaceName }) }) }),
1727
+ /* @__PURE__ */ jsxs7("text", { children: [
1728
+ /* @__PURE__ */ jsxs7("span", { fg: statusColor, children: [
1549
1729
  "\u25CF",
1550
1730
  " ",
1551
1731
  status.status
1552
1732
  ] }),
1553
- env && /* @__PURE__ */ jsxs6("span", { fg: "#555555", children: [
1733
+ env && /* @__PURE__ */ jsxs7("span", { fg: "#555555", children: [
1554
1734
  " ",
1555
1735
  "\u2502",
1556
1736
  " ",
@@ -1558,7 +1738,7 @@ function WorkspaceInfo({ status, workspaceName, workspaceId, focused, loading, e
1558
1738
  ] })
1559
1739
  ] })
1560
1740
  ] }) }),
1561
- dashboardItem && /* @__PURE__ */ jsx6(
1741
+ dashboardItem && /* @__PURE__ */ jsx7(
1562
1742
  InteractiveRow,
1563
1743
  {
1564
1744
  label: getItemLabel(dashboardItem),
@@ -1566,7 +1746,7 @@ function WorkspaceInfo({ status, workspaceName, workspaceId, focused, loading, e
1566
1746
  onClick: () => handleAction(dashboardItem)
1567
1747
  }
1568
1748
  ),
1569
- wakeItem && /* @__PURE__ */ jsx6(
1749
+ wakeItem && /* @__PURE__ */ jsx7(
1570
1750
  InteractiveRow,
1571
1751
  {
1572
1752
  label: getItemLabel(wakeItem),
@@ -1574,34 +1754,34 @@ function WorkspaceInfo({ status, workspaceName, workspaceId, focused, loading, e
1574
1754
  onClick: () => handleAction(wakeItem)
1575
1755
  }
1576
1756
  ),
1577
- (status.isClaudeProcessing || status.isCodexProcessing) && /* @__PURE__ */ jsxs6("box", { backgroundColor: "#1a1500", paddingX: 1, marginX: 1, marginBottom: 1, children: [
1578
- status.isClaudeProcessing && /* @__PURE__ */ jsx6("text", { children: /* @__PURE__ */ jsxs6("span", { fg: "#ffaa00", children: [
1757
+ (status.isClaudeProcessing || status.isCodexProcessing) && /* @__PURE__ */ jsxs7("box", { backgroundColor: "#1a1500", paddingX: 1, marginX: 1, marginBottom: 1, children: [
1758
+ status.isClaudeProcessing && /* @__PURE__ */ jsx7("text", { children: /* @__PURE__ */ jsxs7("span", { fg: "#ffaa00", children: [
1579
1759
  "\u25C6",
1580
1760
  " Claude thinking..."
1581
1761
  ] }) }),
1582
- status.isCodexProcessing && /* @__PURE__ */ jsx6("text", { children: /* @__PURE__ */ jsxs6("span", { fg: "#ffaa00", children: [
1762
+ status.isCodexProcessing && /* @__PURE__ */ jsx7("text", { children: /* @__PURE__ */ jsxs7("span", { fg: "#ffaa00", children: [
1583
1763
  "\u25C6",
1584
1764
  " Codex thinking..."
1585
1765
  ] }) })
1586
1766
  ] }),
1587
- env && /* @__PURE__ */ jsxs6(Section, { title: "Agents", children: [
1588
- /* @__PURE__ */ jsxs6("box", { flexDirection: "row", justifyContent: "space-between", paddingX: 1, backgroundColor: "#111111", children: [
1589
- /* @__PURE__ */ jsx6("text", { children: /* @__PURE__ */ jsx6("span", { fg: "#cccccc", children: "Claude" }) }),
1590
- /* @__PURE__ */ jsx6("text", { children: AUTH_METHOD_LABELS[env.claudeAuthMethod] ? /* @__PURE__ */ jsx6("span", { fg: "#66bb6a", children: AUTH_METHOD_LABELS[env.claudeAuthMethod] }) : /* @__PURE__ */ jsx6("span", { fg: "#ff4444", children: "\u2717" }) })
1767
+ env && /* @__PURE__ */ jsxs7(Section, { title: "Agents", children: [
1768
+ /* @__PURE__ */ jsxs7("box", { flexDirection: "row", justifyContent: "space-between", paddingX: 1, backgroundColor: "#111111", children: [
1769
+ /* @__PURE__ */ jsx7("text", { children: /* @__PURE__ */ jsx7("span", { fg: "#cccccc", children: "Claude" }) }),
1770
+ /* @__PURE__ */ jsx7("text", { children: AUTH_METHOD_LABELS[env.claudeAuthMethod] ? /* @__PURE__ */ jsx7("span", { fg: "#66bb6a", children: AUTH_METHOD_LABELS[env.claudeAuthMethod] }) : /* @__PURE__ */ jsx7("span", { fg: "#ff4444", children: "\u2717" }) })
1591
1771
  ] }),
1592
- /* @__PURE__ */ jsxs6("box", { flexDirection: "row", justifyContent: "space-between", paddingX: 1, backgroundColor: "#111111", children: [
1593
- /* @__PURE__ */ jsx6("text", { children: /* @__PURE__ */ jsx6("span", { fg: "#cccccc", children: "Codex" }) }),
1594
- /* @__PURE__ */ jsx6("text", { children: AUTH_METHOD_LABELS[env.codexAuthMethod] ? /* @__PURE__ */ jsx6("span", { fg: "#66bb6a", children: AUTH_METHOD_LABELS[env.codexAuthMethod] }) : /* @__PURE__ */ jsx6("span", { fg: "#ff4444", children: "\u2717" }) })
1772
+ /* @__PURE__ */ jsxs7("box", { flexDirection: "row", justifyContent: "space-between", paddingX: 1, backgroundColor: "#111111", children: [
1773
+ /* @__PURE__ */ jsx7("text", { children: /* @__PURE__ */ jsx7("span", { fg: "#cccccc", children: "Codex" }) }),
1774
+ /* @__PURE__ */ jsx7("text", { children: AUTH_METHOD_LABELS[env.codexAuthMethod] ? /* @__PURE__ */ jsx7("span", { fg: "#66bb6a", children: AUTH_METHOD_LABELS[env.codexAuthMethod] }) : /* @__PURE__ */ jsx7("span", { fg: "#ff4444", children: "\u2717" }) })
1595
1775
  ] })
1596
1776
  ] }),
1597
- env && /* @__PURE__ */ jsxs6(Section, { title: "Integrations", children: [
1598
- /* @__PURE__ */ jsx6(CardItem, { label: "GitHub", status: env.githubAccessConfigured }),
1599
- /* @__PURE__ */ jsx6(CardItem, { label: "Slack", status: env.slackAccessConfigured }),
1600
- /* @__PURE__ */ jsx6(CardItem, { label: "Linear", status: env.linearAccessConfigured })
1777
+ env && /* @__PURE__ */ jsxs7(Section, { title: "Integrations", children: [
1778
+ /* @__PURE__ */ jsx7(CardItem, { label: "GitHub", status: env.githubAccessConfigured }),
1779
+ /* @__PURE__ */ jsx7(CardItem, { label: "Slack", status: env.slackAccessConfigured }),
1780
+ /* @__PURE__ */ jsx7(CardItem, { label: "Linear", status: env.linearAccessConfigured })
1601
1781
  ] }),
1602
- previews.length > 0 && /* @__PURE__ */ jsx6(Section, { title: "Previews", children: previews.map((preview, i) => {
1782
+ previews.length > 0 && /* @__PURE__ */ jsx7(Section, { title: "Previews", children: previews.map((preview, i) => {
1603
1783
  const previewItem = findItem("preview", String(preview.port));
1604
- return /* @__PURE__ */ jsxs6(
1784
+ return /* @__PURE__ */ jsxs7(
1605
1785
  "box",
1606
1786
  {
1607
1787
  flexDirection: "row",
@@ -1610,40 +1790,40 @@ function WorkspaceInfo({ status, workspaceName, workspaceId, focused, loading, e
1610
1790
  backgroundColor: previewItem && isHighlighted(previewItem) ? "#1a2a1a" : "#111111",
1611
1791
  onMouseDown: () => previewItem && handleAction(previewItem),
1612
1792
  children: [
1613
- /* @__PURE__ */ jsx6("text", { children: /* @__PURE__ */ jsxs6("span", { fg: "#cccccc", children: [
1793
+ /* @__PURE__ */ jsx7("text", { children: /* @__PURE__ */ jsxs7("span", { fg: "#cccccc", children: [
1614
1794
  ":",
1615
1795
  preview.port
1616
1796
  ] }) }),
1617
- /* @__PURE__ */ jsx6("text", { children: /* @__PURE__ */ jsx6("span", { fg: previewItem && isHighlighted(previewItem) ? "#66bb6a" : "#7dcfff", children: "\u2197" }) })
1797
+ /* @__PURE__ */ jsx7("text", { children: /* @__PURE__ */ jsx7("span", { fg: previewItem && isHighlighted(previewItem) ? "#66bb6a" : "#7dcfff", children: "\u2197" }) })
1618
1798
  ]
1619
1799
  },
1620
1800
  i
1621
1801
  );
1622
1802
  }) }),
1623
- status.repoStatuses && status.repoStatuses.length > 0 && /* @__PURE__ */ jsx6(Section, { title: "Repositories", children: status.repoStatuses.map((repo, i) => {
1803
+ status.repoStatuses && status.repoStatuses.length > 0 && /* @__PURE__ */ jsx7(Section, { title: "Repositories", children: status.repoStatuses.map((repo, i) => {
1624
1804
  const prItem = findItem("pr", repo.name);
1625
- return /* @__PURE__ */ jsxs6(React4.Fragment, { children: [
1626
- /* @__PURE__ */ jsx6("box", { backgroundColor: "#111111", paddingX: 1, children: /* @__PURE__ */ jsx6("text", { children: /* @__PURE__ */ jsx6("span", { fg: "#ffffff", children: /* @__PURE__ */ jsx6("strong", { children: repo.name }) }) }) }),
1627
- /* @__PURE__ */ jsx6("box", { backgroundColor: "#111111", paddingX: 1, flexDirection: "row", justifyContent: "space-between", children: /* @__PURE__ */ jsxs6("text", { children: [
1628
- /* @__PURE__ */ jsxs6("span", { fg: "#555555", children: [
1805
+ return /* @__PURE__ */ jsxs7(React5.Fragment, { children: [
1806
+ /* @__PURE__ */ jsx7("box", { backgroundColor: "#111111", paddingX: 1, children: /* @__PURE__ */ jsx7("text", { children: /* @__PURE__ */ jsx7("span", { fg: "#ffffff", children: /* @__PURE__ */ jsx7("strong", { children: repo.name }) }) }) }),
1807
+ /* @__PURE__ */ jsx7("box", { backgroundColor: "#111111", paddingX: 1, flexDirection: "row", justifyContent: "space-between", children: /* @__PURE__ */ jsxs7("text", { children: [
1808
+ /* @__PURE__ */ jsxs7("span", { fg: "#555555", children: [
1629
1809
  "\u2514",
1630
1810
  " "
1631
1811
  ] }),
1632
- /* @__PURE__ */ jsx6("span", { fg: repo.currentBranch !== repo.defaultBranch ? "#ffaa00" : "#66bb6a", children: repo.currentBranch })
1812
+ /* @__PURE__ */ jsx7("span", { fg: repo.currentBranch !== repo.defaultBranch ? "#ffaa00" : "#66bb6a", children: repo.currentBranch })
1633
1813
  ] }) }),
1634
- repo.gitDiff && (repo.gitDiff.added > 0 || repo.gitDiff.removed > 0) && /* @__PURE__ */ jsx6("box", { backgroundColor: "#111111", paddingX: 1, flexDirection: "row", children: /* @__PURE__ */ jsxs6("text", { children: [
1635
- /* @__PURE__ */ jsx6("span", { fg: "#555555", children: " " }),
1636
- /* @__PURE__ */ jsxs6("span", { fg: "#66bb6a", children: [
1814
+ repo.gitDiff && (repo.gitDiff.added > 0 || repo.gitDiff.removed > 0) && /* @__PURE__ */ jsx7("box", { backgroundColor: "#111111", paddingX: 1, flexDirection: "row", children: /* @__PURE__ */ jsxs7("text", { children: [
1815
+ /* @__PURE__ */ jsx7("span", { fg: "#555555", children: " " }),
1816
+ /* @__PURE__ */ jsxs7("span", { fg: "#66bb6a", children: [
1637
1817
  "+",
1638
1818
  repo.gitDiff.added
1639
1819
  ] }),
1640
- /* @__PURE__ */ jsx6("span", { fg: "#444444", children: " / " }),
1641
- /* @__PURE__ */ jsxs6("span", { fg: "#ff4444", children: [
1820
+ /* @__PURE__ */ jsx7("span", { fg: "#444444", children: " / " }),
1821
+ /* @__PURE__ */ jsxs7("span", { fg: "#ff4444", children: [
1642
1822
  "-",
1643
1823
  repo.gitDiff.removed
1644
1824
  ] })
1645
1825
  ] }) }),
1646
- prItem && /* @__PURE__ */ jsx6(
1826
+ prItem && /* @__PURE__ */ jsx7(
1647
1827
  InteractiveRow,
1648
1828
  {
1649
1829
  label: ` ${getItemLabel(prItem)}`,
@@ -1653,35 +1833,35 @@ function WorkspaceInfo({ status, workspaceName, workspaceId, focused, loading, e
1653
1833
  )
1654
1834
  ] }, i);
1655
1835
  }) }),
1656
- env && /* @__PURE__ */ jsxs6(Section, { title: "Hooks", children: [
1657
- /* @__PURE__ */ jsx6(CardItem, { label: "Global warm", status: env.globalWarmHookCompleted.status }),
1658
- env.repositories.map((repo, i) => /* @__PURE__ */ jsxs6(React4.Fragment, { children: [
1659
- /* @__PURE__ */ jsx6("box", { backgroundColor: "#111111", paddingX: 1, children: /* @__PURE__ */ jsx6("text", { children: /* @__PURE__ */ jsx6("span", { fg: "#ffffff", children: /* @__PURE__ */ jsx6("strong", { children: repo.repositoryName }) }) }) }),
1660
- /* @__PURE__ */ jsxs6("box", { flexDirection: "row", justifyContent: "space-between", paddingX: 1, backgroundColor: "#111111", children: [
1661
- /* @__PURE__ */ jsxs6("text", { children: [
1662
- /* @__PURE__ */ jsxs6("span", { fg: "#555555", children: [
1836
+ env && /* @__PURE__ */ jsxs7(Section, { title: "Hooks", children: [
1837
+ /* @__PURE__ */ jsx7(CardItem, { label: "Global warm", status: env.globalWarmHookCompleted.status }),
1838
+ env.repositories.map((repo, i) => /* @__PURE__ */ jsxs7(React5.Fragment, { children: [
1839
+ /* @__PURE__ */ jsx7("box", { backgroundColor: "#111111", paddingX: 1, children: /* @__PURE__ */ jsx7("text", { children: /* @__PURE__ */ jsx7("span", { fg: "#ffffff", children: /* @__PURE__ */ jsx7("strong", { children: repo.repositoryName }) }) }) }),
1840
+ /* @__PURE__ */ jsxs7("box", { flexDirection: "row", justifyContent: "space-between", paddingX: 1, backgroundColor: "#111111", children: [
1841
+ /* @__PURE__ */ jsxs7("text", { children: [
1842
+ /* @__PURE__ */ jsxs7("span", { fg: "#555555", children: [
1663
1843
  "\u251C",
1664
1844
  " "
1665
1845
  ] }),
1666
- /* @__PURE__ */ jsx6("span", { fg: "#cccccc", children: "warm" })
1846
+ /* @__PURE__ */ jsx7("span", { fg: "#cccccc", children: "warm" })
1667
1847
  ] }),
1668
- /* @__PURE__ */ jsx6("text", { children: /* @__PURE__ */ jsx6(StatusDot, { status: repo.warmHookCompleted }) })
1848
+ /* @__PURE__ */ jsx7("text", { children: /* @__PURE__ */ jsx7(StatusDot, { status: repo.warmHookCompleted }) })
1669
1849
  ] }),
1670
- /* @__PURE__ */ jsxs6("box", { flexDirection: "row", justifyContent: "space-between", paddingX: 1, backgroundColor: "#111111", children: [
1671
- /* @__PURE__ */ jsxs6("text", { children: [
1672
- /* @__PURE__ */ jsxs6("span", { fg: "#555555", children: [
1850
+ /* @__PURE__ */ jsxs7("box", { flexDirection: "row", justifyContent: "space-between", paddingX: 1, backgroundColor: "#111111", children: [
1851
+ /* @__PURE__ */ jsxs7("text", { children: [
1852
+ /* @__PURE__ */ jsxs7("span", { fg: "#555555", children: [
1673
1853
  "\u2514",
1674
1854
  " "
1675
1855
  ] }),
1676
- /* @__PURE__ */ jsx6("span", { fg: "#cccccc", children: "start" })
1856
+ /* @__PURE__ */ jsx7("span", { fg: "#cccccc", children: "start" })
1677
1857
  ] }),
1678
- /* @__PURE__ */ jsx6("text", { children: /* @__PURE__ */ jsx6(StatusDot, { status: repo.startHookCompleted }) })
1858
+ /* @__PURE__ */ jsx7("text", { children: /* @__PURE__ */ jsx7(StatusDot, { status: repo.startHookCompleted }) })
1679
1859
  ] })
1680
1860
  ] }, i))
1681
1861
  ] }),
1682
- env && (expectedSkills.length > 0 || env.skillsInstalled.length > 0) && /* @__PURE__ */ jsx6(Section, { title: "Skills", children: /* @__PURE__ */ jsx6(DetailList, { expected: expectedSkills, actual: env.skillsInstalled }) }),
1683
- env && (expectedGlobalVars.length > 0 || env.envVarsSet.length > 0) && /* @__PURE__ */ jsx6(Section, { title: "Env Vars", children: /* @__PURE__ */ jsx6(DetailList, { expected: expectedGlobalVars, actual: env.envVarsSet }) }),
1684
- env && (expectedGlobalFiles.length > 0 || env.filesUploaded.length > 0) && /* @__PURE__ */ jsx6(Section, { title: "Files", children: /* @__PURE__ */ jsx6(DetailList, { expected: expectedGlobalFiles, actual: env.filesUploaded }) })
1862
+ env && (expectedSkills.length > 0 || env.skillsInstalled.length > 0) && /* @__PURE__ */ jsx7(Section, { title: "Skills", children: /* @__PURE__ */ jsx7(DetailList, { expected: expectedSkills, actual: env.skillsInstalled }) }),
1863
+ env && (expectedGlobalVars.length > 0 || env.envVarsSet.length > 0) && /* @__PURE__ */ jsx7(Section, { title: "Env Vars", children: /* @__PURE__ */ jsx7(DetailList, { expected: expectedGlobalVars, actual: env.envVarsSet }) }),
1864
+ env && (expectedGlobalFiles.length > 0 || env.filesUploaded.length > 0) && /* @__PURE__ */ jsx7(Section, { title: "Files", children: /* @__PURE__ */ jsx7(DetailList, { expected: expectedGlobalFiles, actual: env.filesUploaded }) })
1685
1865
  ] })
1686
1866
  }
1687
1867
  );
@@ -1691,8 +1871,8 @@ function WorkspaceInfo({ status, workspaceName, workspaceId, focused, loading, e
1691
1871
  import { useTerminalDimensions as useTerminalDimensions2 } from "@opentui/react";
1692
1872
 
1693
1873
  // src/interactive/toast-context.tsx
1694
- import { createContext as createContext2, useContext as useContext2, useState as useState5, useCallback as useCallback5, useRef as useRef2 } from "react";
1695
- import { jsx as jsx7 } from "@opentui/react/jsx-runtime";
1874
+ import { createContext as createContext2, useContext as useContext2, useState as useState6, useCallback as useCallback5, useRef as useRef2 } from "react";
1875
+ import { jsx as jsx8 } from "@opentui/react/jsx-runtime";
1696
1876
  var ToastContext = createContext2(null);
1697
1877
  function useToast() {
1698
1878
  const ctx = useContext2(ToastContext);
@@ -1700,7 +1880,7 @@ function useToast() {
1700
1880
  return ctx;
1701
1881
  }
1702
1882
  function ToastProvider({ children }) {
1703
- const [current, setCurrent] = useState5(null);
1883
+ const [current, setCurrent] = useState6(null);
1704
1884
  const timeoutRef = useRef2(null);
1705
1885
  const show = useCallback5((options) => {
1706
1886
  const { message, variant = "info", duration = 3e3 } = options;
@@ -1714,11 +1894,11 @@ function ToastProvider({ children }) {
1714
1894
  const message = err instanceof Error ? err.message : "An error occurred";
1715
1895
  show({ message, variant: "error", duration: 5e3 });
1716
1896
  }, [show]);
1717
- return /* @__PURE__ */ jsx7(ToastContext.Provider, { value: { current, show, error }, children });
1897
+ return /* @__PURE__ */ jsx8(ToastContext.Provider, { value: { current, show, error }, children });
1718
1898
  }
1719
1899
 
1720
1900
  // src/interactive/components/Toast.tsx
1721
- import { jsx as jsx8 } from "@opentui/react/jsx-runtime";
1901
+ import { jsx as jsx9 } from "@opentui/react/jsx-runtime";
1722
1902
  var VARIANT_COLORS = {
1723
1903
  info: { border: "#66bb6a", bg: "#0a1a0a" },
1724
1904
  success: { border: "#66bb6a", bg: "#0a1a0a" },
@@ -1731,7 +1911,7 @@ function Toast() {
1731
1911
  if (!current) return null;
1732
1912
  const colors = VARIANT_COLORS[current.variant] ?? VARIANT_COLORS.info;
1733
1913
  const toastWidth = Math.min(60, width - 4);
1734
- return /* @__PURE__ */ jsx8(
1914
+ return /* @__PURE__ */ jsx9(
1735
1915
  "box",
1736
1916
  {
1737
1917
  position: "absolute",
@@ -1745,13 +1925,13 @@ function Toast() {
1745
1925
  border: true,
1746
1926
  borderStyle: "rounded",
1747
1927
  zIndex: 100,
1748
- children: /* @__PURE__ */ jsx8("text", { fg: "#ffffff", selectable: true, children: current.message })
1928
+ children: /* @__PURE__ */ jsx9("text", { fg: "#ffffff", selectable: true, children: current.message })
1749
1929
  }
1750
1930
  );
1751
1931
  }
1752
1932
 
1753
1933
  // src/interactive/App.tsx
1754
- import { jsx as jsx9, jsxs as jsxs7 } from "@opentui/react/jsx-runtime";
1934
+ import { jsx as jsx10, jsxs as jsxs8 } from "@opentui/react/jsx-runtime";
1755
1935
  var FOCUS_ORDER = ["sidebar", "chat-tabs", "chat-history", "chat-input", "info"];
1756
1936
  var MOCK_CHATS = [
1757
1937
  { id: "mock-claude", provider: "claude", title: "Claude Code", createdAt: "", updatedAt: "", processing: false },
@@ -1773,9 +1953,9 @@ var authValue = {
1773
1953
  queryClient
1774
1954
  };
1775
1955
  function App() {
1776
- return /* @__PURE__ */ jsx9(ReplicasAuthProvider, { value: authValue, children: /* @__PURE__ */ jsxs7(ToastProvider, { children: [
1777
- /* @__PURE__ */ jsx9(AppInner, {}),
1778
- /* @__PURE__ */ jsx9(Toast, {})
1956
+ return /* @__PURE__ */ jsx10(ReplicasAuthProvider, { value: authValue, children: /* @__PURE__ */ jsxs8(ToastProvider, { children: [
1957
+ /* @__PURE__ */ jsx10(AppInner, {}),
1958
+ /* @__PURE__ */ jsx10(Toast, {})
1779
1959
  ] }) });
1780
1960
  }
1781
1961
  function AppInner() {
@@ -1795,17 +1975,17 @@ function AppInner() {
1795
1975
  renderer.off("selection", handler);
1796
1976
  };
1797
1977
  }, [renderer, toast]);
1798
- const [selectedWorkspaceId, setSelectedWorkspaceId] = useState6(null);
1799
- const [selectedChatId, setSelectedChatId] = useState6(null);
1800
- const [focusPanel, setFocusPanel] = useState6("sidebar");
1801
- const [taskMode, setTaskMode] = useState6("build");
1802
- const [mockWorkspaces, setMockWorkspaces] = useState6([]);
1978
+ const [selectedWorkspaceId, setSelectedWorkspaceId] = useState7(null);
1979
+ const [selectedChatId, setSelectedChatId] = useState7(null);
1980
+ const [focusPanel, setFocusPanel] = useState7("sidebar");
1981
+ const [taskMode, setTaskMode] = useState7("build");
1982
+ const [mockWorkspaces, setMockWorkspaces] = useState7([]);
1803
1983
  const mockToRealRef = useRef3(/* @__PURE__ */ new Map());
1804
1984
  const mockGroupRef = useRef3(/* @__PURE__ */ new Map());
1805
- const [mockMessages, setMockMessages] = useState6([]);
1806
- const [mockThinking, setMockThinking] = useState6(false);
1985
+ const [mockMessages, setMockMessages] = useState7([]);
1986
+ const [mockThinking, setMockThinking] = useState7(false);
1807
1987
  const pendingMessageRef = useRef3(/* @__PURE__ */ new Map());
1808
- const mockIds = useMemo4(() => new Set(mockWorkspaces.map((m) => m.id)), [mockWorkspaces]);
1988
+ const mockIds = useMemo5(() => new Set(mockWorkspaces.map((m) => m.id)), [mockWorkspaces]);
1809
1989
  const isMockSelected = selectedWorkspaceId ? mockIds.has(selectedWorkspaceId) : false;
1810
1990
  const { data: workspacesData, isLoading: loadingWorkspaces } = useWorkspaces(1, 100, "organization");
1811
1991
  const { data: reposData } = useRepositories();
@@ -1819,7 +1999,7 @@ function AppInner() {
1819
1999
  );
1820
2000
  const { data: chatsData } = useWorkspaceChats(isMockSelected ? null : selectedWorkspaceId);
1821
2001
  const chats = isMockSelected ? MOCK_CHATS : chatsData?.chats ?? [];
1822
- const resolvedChatId = useMemo4(() => {
2002
+ const resolvedChatId = useMemo5(() => {
1823
2003
  if (selectedChatId && chats.find((c) => c.id === selectedChatId)) {
1824
2004
  return selectedChatId;
1825
2005
  }
@@ -1837,22 +2017,22 @@ function AppInner() {
1837
2017
  const deleteWorkspaceMutation = useDeleteWorkspace();
1838
2018
  const wakeWorkspaceMutation = useWakeWorkspace();
1839
2019
  const generateNameMutation = useGenerateWorkspaceName();
1840
- const [wakingWorkspaceId, setWakingWorkspaceId] = useState6(null);
2020
+ const [wakingWorkspaceId, setWakingWorkspaceId] = useState7(null);
1841
2021
  const sendMessageMutation = useSendChatMessage(selectedWorkspaceId, resolvedChatId);
1842
2022
  const interruptMutation = useInterruptChat(selectedWorkspaceId, resolvedChatId);
1843
2023
  const workspaces = workspacesData?.workspaces ?? [];
1844
2024
  const repositories = reposData?.repositories ?? [];
1845
2025
  const repositorySets = setsData?.repository_sets ?? [];
1846
2026
  const previews = previewsData?.previews ?? [];
1847
- const allWorkspaces = useMemo4(() => [...mockWorkspaces, ...workspaces], [mockWorkspaces, workspaces]);
1848
- const groups = useMemo4(
2027
+ const allWorkspaces = useMemo5(() => [...mockWorkspaces, ...workspaces], [mockWorkspaces, workspaces]);
2028
+ const groups = useMemo5(
1849
2029
  () => buildGroups(allWorkspaces, workspacesData, repositories, repositorySets, mockGroupRef.current),
1850
2030
  [allWorkspaces, workspacesData, repositories, repositorySets]
1851
2031
  );
1852
2032
  const selectedWorkspace = allWorkspaces.find((ws) => ws.id === selectedWorkspaceId) ?? null;
1853
2033
  const selectedChat = chats.find((c) => c.id === resolvedChatId) ?? null;
1854
2034
  const isProcessing = mockThinking || (selectedChat?.processing ?? false);
1855
- const displayMessages = useMemo4(() => {
2035
+ const displayMessages = useMemo5(() => {
1856
2036
  if (isMockSelected) return mockMessages;
1857
2037
  const rawEvents = historyData?.events ?? [];
1858
2038
  const events = rawEvents.filter(isAgentBackendEvent);
@@ -2039,9 +2219,9 @@ function AppInner() {
2039
2219
  },
2040
2220
  [selectedWorkspaceId, resolvedChatId, isMockSelected, sendMessageMutation, taskMode]
2041
2221
  );
2042
- return /* @__PURE__ */ jsxs7("box", { flexDirection: "column", width: "100%", height: "100%", backgroundColor: "#000000", children: [
2043
- /* @__PURE__ */ jsxs7("box", { flexDirection: "row", flexGrow: 1, backgroundColor: "#000000", children: [
2044
- showWorkspacePanel && /* @__PURE__ */ jsx9(
2222
+ return /* @__PURE__ */ jsxs8("box", { flexDirection: "column", width: "100%", height: "100%", backgroundColor: "#000000", children: [
2223
+ /* @__PURE__ */ jsxs8("box", { flexDirection: "row", flexGrow: 1, backgroundColor: "#000000", children: [
2224
+ showWorkspacePanel && /* @__PURE__ */ jsx10(
2045
2225
  WorkspaceSidebar,
2046
2226
  {
2047
2227
  groups,
@@ -2056,7 +2236,7 @@ function AppInner() {
2056
2236
  loading: loadingWorkspaces
2057
2237
  }
2058
2238
  ),
2059
- selectedWorkspaceId && statusData?.status !== "sleeping" ? /* @__PURE__ */ jsx9(
2239
+ selectedWorkspaceId && statusData?.status !== "sleeping" ? /* @__PURE__ */ jsx10(
2060
2240
  ChatArea,
2061
2241
  {
2062
2242
  chats,
@@ -2070,7 +2250,7 @@ function AppInner() {
2070
2250
  isProcessing,
2071
2251
  loading: loadingMessages
2072
2252
  }
2073
- ) : selectedWorkspaceId && statusData?.status === "sleeping" ? /* @__PURE__ */ jsxs7(
2253
+ ) : selectedWorkspaceId && statusData?.status === "sleeping" ? /* @__PURE__ */ jsxs8(
2074
2254
  "box",
2075
2255
  {
2076
2256
  flexGrow: 1,
@@ -2083,18 +2263,18 @@ function AppInner() {
2083
2263
  flexDirection: "column",
2084
2264
  gap: 1,
2085
2265
  children: [
2086
- /* @__PURE__ */ jsxs7("text", { fg: "#888888", children: [
2266
+ /* @__PURE__ */ jsxs8("text", { fg: "#888888", children: [
2087
2267
  "\u263E",
2088
2268
  " This workspace is sleeping"
2089
2269
  ] }),
2090
- /* @__PURE__ */ jsxs7("text", { fg: "#555555", children: [
2270
+ /* @__PURE__ */ jsxs8("text", { fg: "#555555", children: [
2091
2271
  "Press ",
2092
- /* @__PURE__ */ jsx9("span", { fg: "#66bb6a", children: /* @__PURE__ */ jsx9("strong", { children: "w" }) }),
2272
+ /* @__PURE__ */ jsx10("span", { fg: "#66bb6a", children: /* @__PURE__ */ jsx10("strong", { children: "w" }) }),
2093
2273
  " to wake it up"
2094
2274
  ] })
2095
2275
  ]
2096
2276
  }
2097
- ) : /* @__PURE__ */ jsx9(
2277
+ ) : /* @__PURE__ */ jsx10(
2098
2278
  "box",
2099
2279
  {
2100
2280
  flexGrow: 1,
@@ -2104,10 +2284,10 @@ function AppInner() {
2104
2284
  backgroundColor: "#000000",
2105
2285
  justifyContent: "center",
2106
2286
  alignItems: "center",
2107
- children: /* @__PURE__ */ jsx9("text", { fg: "#555555", children: "Create a workspace to begin building!" })
2287
+ children: /* @__PURE__ */ jsx10("text", { fg: "#555555", children: "Create a workspace to begin building!" })
2108
2288
  }
2109
2289
  ),
2110
- showInfoPanel && /* @__PURE__ */ jsx9(
2290
+ showInfoPanel && /* @__PURE__ */ jsx10(
2111
2291
  WorkspaceInfo,
2112
2292
  {
2113
2293
  status: statusData ?? null,
@@ -2126,7 +2306,7 @@ function AppInner() {
2126
2306
  }
2127
2307
  )
2128
2308
  ] }),
2129
- /* @__PURE__ */ jsx9(
2309
+ /* @__PURE__ */ jsx10(
2130
2310
  StatusBar,
2131
2311
  {
2132
2312
  focusPanel
@@ -2136,12 +2316,12 @@ function AppInner() {
2136
2316
  }
2137
2317
 
2138
2318
  // src/interactive/index.tsx
2139
- import { jsx as jsx10 } from "@opentui/react/jsx-runtime";
2319
+ import { jsx as jsx11 } from "@opentui/react/jsx-runtime";
2140
2320
  async function launchInteractive() {
2141
2321
  const renderer = await createCliRenderer({
2142
2322
  exitOnCtrlC: false
2143
2323
  });
2144
- createRoot(renderer).render(/* @__PURE__ */ jsx10(App, {}));
2324
+ createRoot(renderer).render(/* @__PURE__ */ jsx11(App, {}));
2145
2325
  }
2146
2326
  export {
2147
2327
  launchInteractive