osagent 0.1.22 → 0.1.23

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.
Files changed (2) hide show
  1. package/dist/cli.js +524 -261
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -146108,7 +146108,7 @@ function createContentGeneratorConfig(config, authType, generationConfig) {
146108
146108
  };
146109
146109
  }
146110
146110
  async function createContentGenerator(config, gcConfig, sessionId2, isInitialAuth) {
146111
- const version2 = "0.1.22";
146111
+ const version2 = "0.1.23";
146112
146112
  const userAgent2 = `OSAgent/${version2} (${process.platform}; ${process.arch})`;
146113
146113
  const baseHeaders = {
146114
146114
  "User-Agent": userAgent2
@@ -239491,7 +239491,7 @@ var require_backend = __commonJS({
239491
239491
  return [b, function() {
239492
239492
  }];
239493
239493
  }, "useReducer"),
239494
- useRef: /* @__PURE__ */ __name(function useRef21(a) {
239494
+ useRef: /* @__PURE__ */ __name(function useRef22(a) {
239495
239495
  var b = C();
239496
239496
  a = null !== b ? b.memoizedState : {
239497
239497
  current: a
@@ -309699,7 +309699,7 @@ __name(getPackageJson, "getPackageJson");
309699
309699
  // packages/cli/src/utils/version.ts
309700
309700
  async function getCliVersion() {
309701
309701
  const pkgJson = await getPackageJson();
309702
- return "0.1.22";
309702
+ return "0.1.23";
309703
309703
  }
309704
309704
  __name(getCliVersion, "getCliVersion");
309705
309705
 
@@ -313868,7 +313868,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
313868
313868
 
313869
313869
  // packages/cli/src/generated/git-commit.ts
313870
313870
  init_esbuild_shims();
313871
- var GIT_COMMIT_INFO2 = "ccf1c11";
313871
+ var GIT_COMMIT_INFO2 = "4703098";
313872
313872
 
313873
313873
  // packages/cli/src/utils/systemInfo.ts
313874
313874
  async function getNpmVersion() {
@@ -314710,11 +314710,14 @@ var consultCommand = {
314710
314710
  return t2("Enable active consultation mode");
314711
314711
  },
314712
314712
  kind: "built-in" /* BUILT_IN */,
314713
- action: /* @__PURE__ */ __name(async () => ({
314714
- type: "message",
314715
- messageType: "info",
314716
- content: t2("Consultation mode: ACTIVE\nThe agent will ask clarifying questions as you work.\nPress [a] to answer, [s] to skip questions.")
314717
- }), "action")
314713
+ action: /* @__PURE__ */ __name(async (context2) => {
314714
+ context2.services.consultation?.setConsultationMode("active");
314715
+ return {
314716
+ type: "message",
314717
+ messageType: "info",
314718
+ content: t2("Consultation mode: ACTIVE\nThe agent will ask clarifying questions as you work.\nQuestions appear below the status bar.")
314719
+ };
314720
+ }, "action")
314718
314721
  },
314719
314722
  {
314720
314723
  name: "off",
@@ -314722,11 +314725,14 @@ var consultCommand = {
314722
314725
  return t2("Disable consultation mode");
314723
314726
  },
314724
314727
  kind: "built-in" /* BUILT_IN */,
314725
- action: /* @__PURE__ */ __name(async () => ({
314726
- type: "message",
314727
- messageType: "info",
314728
- content: t2("Consultation mode: OFF\nNo questions will be asked.")
314729
- }), "action")
314728
+ action: /* @__PURE__ */ __name(async (context2) => {
314729
+ context2.services.consultation?.setConsultationMode("passive");
314730
+ return {
314731
+ type: "message",
314732
+ messageType: "info",
314733
+ content: t2("Consultation mode: OFF\nNo questions will be asked.")
314734
+ };
314735
+ }, "action")
314730
314736
  },
314731
314737
  {
314732
314738
  name: "blocking",
@@ -314734,11 +314740,14 @@ var consultCommand = {
314734
314740
  return t2("Enable blocking mode - high priority questions pause the agent");
314735
314741
  },
314736
314742
  kind: "built-in" /* BUILT_IN */,
314737
- action: /* @__PURE__ */ __name(async () => ({
314738
- type: "message",
314739
- messageType: "info",
314740
- content: t2("Consultation mode: BLOCKING\nHigh priority questions will pause the agent until answered.\nThis ensures critical decisions get your input.")
314741
- }), "action")
314743
+ action: /* @__PURE__ */ __name(async (context2) => {
314744
+ context2.services.consultation?.setConsultationMode("blocking");
314745
+ return {
314746
+ type: "message",
314747
+ messageType: "info",
314748
+ content: t2("Consultation mode: BLOCKING\nHigh priority questions will pause the agent until answered.\nThis ensures critical decisions get your input.")
314749
+ };
314750
+ }, "action")
314742
314751
  },
314743
314752
  {
314744
314753
  name: "context",
@@ -314746,11 +314755,23 @@ var consultCommand = {
314746
314755
  return t2("Show collected context from consultation");
314747
314756
  },
314748
314757
  kind: "built-in" /* BUILT_IN */,
314749
- action: /* @__PURE__ */ __name(async () => ({
314750
- type: "message",
314751
- messageType: "info",
314752
- content: t2("Use this to view all context gathered through consultation.\n(Context will appear here when questions are answered)")
314753
- }), "action")
314758
+ action: /* @__PURE__ */ __name(async (context2) => {
314759
+ const contextStr = context2.services.consultation?.getContextForAgent() || "";
314760
+ if (!contextStr) {
314761
+ return {
314762
+ type: "message",
314763
+ messageType: "info",
314764
+ content: t2("No consultation context collected yet.\nAnswer questions as they appear to build context.")
314765
+ };
314766
+ }
314767
+ return {
314768
+ type: "message",
314769
+ messageType: "info",
314770
+ content: t2(`Collected Context:
314771
+
314772
+ ${contextStr}`)
314773
+ };
314774
+ }, "action")
314754
314775
  },
314755
314776
  {
314756
314777
  name: "clear",
@@ -314758,15 +314779,49 @@ var consultCommand = {
314758
314779
  return t2("Clear all collected consultation context");
314759
314780
  },
314760
314781
  kind: "built-in" /* BUILT_IN */,
314761
- action: /* @__PURE__ */ __name(async () => ({
314762
- type: "message",
314763
- messageType: "info",
314764
- content: t2("Consultation context cleared.")
314765
- }), "action")
314782
+ action: /* @__PURE__ */ __name(async (context2) => {
314783
+ context2.services.consultation?.clearContext();
314784
+ return {
314785
+ type: "message",
314786
+ messageType: "info",
314787
+ content: t2("Consultation context cleared.")
314788
+ };
314789
+ }, "action")
314790
+ },
314791
+ {
314792
+ name: "demo",
314793
+ get description() {
314794
+ return t2("Add demo consultation questions for testing");
314795
+ },
314796
+ kind: "built-in" /* BUILT_IN */,
314797
+ action: /* @__PURE__ */ __name(async (context2) => {
314798
+ context2.services.consultation?.addQuestion({
314799
+ question: "What programming language should we use?",
314800
+ context: "Based on your project structure",
314801
+ priority: "high",
314802
+ category: "architecture"
314803
+ });
314804
+ context2.services.consultation?.addQuestion({
314805
+ question: "Should we include unit tests?",
314806
+ priority: "medium",
314807
+ category: "requirements"
314808
+ });
314809
+ context2.services.consultation?.addQuestion({
314810
+ question: "Preferred code style (tabs vs spaces)?",
314811
+ priority: "low",
314812
+ category: "preference"
314813
+ });
314814
+ return {
314815
+ type: "message",
314816
+ messageType: "info",
314817
+ content: t2("Added 3 demo consultation questions. Check the consultation panel below the status bar.")
314818
+ };
314819
+ }, "action")
314766
314820
  }
314767
314821
  ],
314768
- action: /* @__PURE__ */ __name(async (_context, args) => {
314822
+ action: /* @__PURE__ */ __name(async (context2, args) => {
314769
314823
  const argTrimmed = args.trim().toLowerCase();
314824
+ const currentMode = context2.services.consultation?.consultationMode || "active";
314770
314825
  if (!argTrimmed) {
314771
314826
  return {
314772
314827
  type: "message",
@@ -314774,9 +314829,9 @@ var consultCommand = {
314774
314829
  content: t2(`Consultation Mode
314775
314830
 
314776
314831
  The consultation system gathers context from you as you work:
314777
- - Questions appear below the loading indicator
314778
- - Press [a] to answer, [s] to skip
314779
- - Context is used to improve agent responses
314832
+ - Questions appear below the status bar
314833
+ - Answer questions to improve agent responses
314834
+ - Context is used across your session
314780
314835
 
314781
314836
  Commands:
314782
314837
  /consult on - Active mode (questions shown, agent continues)
@@ -314784,8 +314839,9 @@ Commands:
314784
314839
  /consult off - Disable consultation
314785
314840
  /consult context - View collected context
314786
314841
  /consult clear - Clear all context
314842
+ /consult demo - Add demo questions for testing
314787
314843
 
314788
- Current: Active mode`)
314844
+ Current mode: ${currentMode}`)
314789
314845
  };
314790
314846
  }
314791
314847
  return {
@@ -318722,6 +318778,173 @@ var spCommand = {
318722
318778
  }, "completion")
318723
318779
  };
318724
318780
 
318781
+ // packages/cli/src/ui/commands/taskmasterCommand.ts
318782
+ init_esbuild_shims();
318783
+ var taskmasterCommand = {
318784
+ name: "taskmaster",
318785
+ altNames: ["tm", "tasks"],
318786
+ get description() {
318787
+ return t2("Manage the Taskmaster orchestration system");
318788
+ },
318789
+ kind: "built-in" /* BUILT_IN */,
318790
+ subCommands: [
318791
+ {
318792
+ name: "status",
318793
+ get description() {
318794
+ return t2("Show current Taskmaster status");
318795
+ },
318796
+ kind: "built-in" /* BUILT_IN */,
318797
+ action: /* @__PURE__ */ __name(async (_context) => ({
318798
+ type: "message",
318799
+ messageType: "info",
318800
+ content: t2(`Taskmaster Status
318801
+ \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501
318802
+
318803
+ Status: Active
318804
+ Mode: Autonomous
318805
+
318806
+ The Taskmaster is currently managing tasks and coordinating agents.
318807
+ Use /taskmaster view to see all tasks.`)
318808
+ }), "action")
318809
+ },
318810
+ {
318811
+ name: "view",
318812
+ get description() {
318813
+ return t2("View all current tasks");
318814
+ },
318815
+ kind: "built-in" /* BUILT_IN */,
318816
+ action: /* @__PURE__ */ __name(async (_context) => ({
318817
+ type: "message",
318818
+ messageType: "info",
318819
+ content: t2(`Current Tasks
318820
+ \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501
318821
+
318822
+ No tasks currently queued.
318823
+ Tasks will appear here when the agent is working.
318824
+
318825
+ Tip: Use /taskmaster add "task description" to manually add a task.`)
318826
+ }), "action")
318827
+ },
318828
+ {
318829
+ name: "add",
318830
+ get description() {
318831
+ return t2("Add a task to the queue");
318832
+ },
318833
+ kind: "built-in" /* BUILT_IN */,
318834
+ action: /* @__PURE__ */ __name(async (_context, args) => {
318835
+ const taskDescription = args.trim();
318836
+ if (!taskDescription) {
318837
+ return {
318838
+ type: "message",
318839
+ messageType: "error",
318840
+ content: t2('Please provide a task description: /taskmaster add "task description"')
318841
+ };
318842
+ }
318843
+ return {
318844
+ type: "message",
318845
+ messageType: "info",
318846
+ content: t2(`Task Added
318847
+ \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501
318848
+
318849
+ "${taskDescription}"
318850
+
318851
+ The task has been added to the queue and will be processed.`)
318852
+ };
318853
+ }, "action")
318854
+ },
318855
+ {
318856
+ name: "clear",
318857
+ get description() {
318858
+ return t2("Clear all tasks from the queue");
318859
+ },
318860
+ kind: "built-in" /* BUILT_IN */,
318861
+ action: /* @__PURE__ */ __name(async (_context) => ({
318862
+ type: "message",
318863
+ messageType: "info",
318864
+ content: t2("All tasks cleared from the queue.")
318865
+ }), "action")
318866
+ },
318867
+ {
318868
+ name: "pause",
318869
+ get description() {
318870
+ return t2("Pause task processing");
318871
+ },
318872
+ kind: "built-in" /* BUILT_IN */,
318873
+ action: /* @__PURE__ */ __name(async (_context) => ({
318874
+ type: "message",
318875
+ messageType: "info",
318876
+ content: t2("Task processing paused. Use /taskmaster resume to continue.")
318877
+ }), "action")
318878
+ },
318879
+ {
318880
+ name: "resume",
318881
+ get description() {
318882
+ return t2("Resume task processing");
318883
+ },
318884
+ kind: "built-in" /* BUILT_IN */,
318885
+ action: /* @__PURE__ */ __name(async (_context) => ({
318886
+ type: "message",
318887
+ messageType: "info",
318888
+ content: t2("Task processing resumed.")
318889
+ }), "action")
318890
+ },
318891
+ {
318892
+ name: "agents",
318893
+ get description() {
318894
+ return t2("Show agent status and activity");
318895
+ },
318896
+ kind: "built-in" /* BUILT_IN */,
318897
+ action: /* @__PURE__ */ __name(async (_context) => ({
318898
+ type: "message",
318899
+ messageType: "info",
318900
+ content: t2(`Agent Status
318901
+ \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501
318902
+
318903
+ \u{1F3AF} Orchestrator: Ready
318904
+ \u{1F4BB} Coder: Idle
318905
+ \u{1F441}\uFE0F Reviewer: Idle
318906
+ \u{1F9EA} Tester: Idle
318907
+ \u{1F4CA} Analyst: Idle
318908
+
318909
+ All agents are standing by for task assignment.`)
318910
+ }), "action")
318911
+ }
318912
+ ],
318913
+ action: /* @__PURE__ */ __name(async (_context, args) => {
318914
+ if (args.trim()) {
318915
+ return {
318916
+ type: "message",
318917
+ messageType: "error",
318918
+ content: t2(`Unknown subcommand: ${args.trim()}
318919
+ Use /taskmaster for help.`)
318920
+ };
318921
+ }
318922
+ return {
318923
+ type: "message",
318924
+ messageType: "info",
318925
+ content: t2(`Taskmaster - Orchestration System
318926
+ \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501
318927
+
318928
+ The Taskmaster coordinates all agent activity:
318929
+ \u2022 Queues and prioritizes incoming prompts
318930
+ \u2022 Delegates tasks to specialized agents
318931
+ \u2022 Tracks progress and manages dependencies
318932
+ \u2022 Collects context from user consultation
318933
+
318934
+ Commands:
318935
+ /taskmaster status - Show current status
318936
+ /taskmaster view - View all tasks
318937
+ /taskmaster add - Add a task manually
318938
+ /taskmaster clear - Clear all tasks
318939
+ /taskmaster pause - Pause processing
318940
+ /taskmaster resume - Resume processing
318941
+ /taskmaster agents - Show agent status
318942
+
318943
+ Shortcuts: /tm, /tasks`)
318944
+ };
318945
+ }, "action")
318946
+ };
318947
+
318725
318948
  // packages/cli/src/ui/commands/terminalSetupCommand.ts
318726
318949
  init_esbuild_shims();
318727
318950
 
@@ -319627,6 +319850,7 @@ var BuiltinCommandLoader = class {
319627
319850
  restoreCommand(this.config),
319628
319851
  statsCommand,
319629
319852
  summaryCommand,
319853
+ taskmasterCommand,
319630
319854
  themeCommand,
319631
319855
  toolsCommand,
319632
319856
  settingsCommand,
@@ -353748,150 +353972,17 @@ var ScreenReaderAppLayout = /* @__PURE__ */ __name(() => {
353748
353972
  // packages/cli/src/ui/layouts/DefaultAppLayout.tsx
353749
353973
  init_esbuild_shims();
353750
353974
 
353751
- // packages/cli/src/ui/components/StatusBar.tsx
353752
- init_esbuild_shims();
353753
- var import_react101 = __toESM(require_react(), 1);
353754
- var import_jsx_runtime106 = __toESM(require_jsx_runtime(), 1);
353755
- var STATUS_ICONS2 = {
353756
- pending: "\u25CB",
353757
- in_progress: "\u25D0",
353758
- completed: "\u25CF"
353759
- };
353760
- function formatTokenCount(count) {
353761
- if (count >= 1e6) {
353762
- return `${(count / 1e6).toFixed(1)}M`;
353763
- }
353764
- if (count >= 1e3) {
353765
- return `${(count / 1e3).toFixed(1)}k`;
353766
- }
353767
- return String(count);
353768
- }
353769
- __name(formatTokenCount, "formatTokenCount");
353770
- var StatusBar = /* @__PURE__ */ __name(() => {
353771
- const { todos, getActiveTodo } = useTodos();
353772
- const { stats } = useSessionStats();
353773
- const streamingState = useStreamingContext();
353774
- const [elapsedMs, setElapsedMs] = (0, import_react101.useState)(0);
353775
- (0, import_react101.useEffect)(() => {
353776
- const interval = setInterval(() => {
353777
- setElapsedMs(Date.now() - stats.sessionStartTime.getTime());
353778
- }, 1e3);
353779
- return () => clearInterval(interval);
353780
- }, [stats.sessionStartTime]);
353781
- const activeTodo = getActiveTodo();
353782
- const computed = computeSessionStats(stats.metrics);
353783
- const isResponding = streamingState === "responding" /* Responding */;
353784
- let totalInputTokens = 0;
353785
- let totalOutputTokens = 0;
353786
- for (const model of Object.values(stats.metrics.models)) {
353787
- totalInputTokens += model.tokens.prompt;
353788
- totalOutputTokens += model.tokens.candidates;
353789
- }
353790
- const totalTokens = totalInputTokens + totalOutputTokens;
353791
- let statusText = "Ready";
353792
- if (isResponding) {
353793
- statusText = activeTodo?.activeForm || "Thinking...";
353794
- } else if (streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */) {
353795
- statusText = "Waiting for confirmation";
353796
- } else if (activeTodo) {
353797
- statusText = activeTodo.activeForm || activeTodo.content;
353798
- }
353799
- const completedCount = todos.filter((t3) => t3.status === "completed").length;
353800
- const totalCount = todos.length;
353801
- if (!isResponding && (!todos || todos.length === 0)) {
353802
- return null;
353803
- }
353804
- return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
353805
- /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
353806
- Box_default,
353807
- {
353808
- borderStyle: "round",
353809
- borderColor: isResponding ? Colors.AccentCyan : theme.border.default,
353810
- paddingX: 1,
353811
- flexDirection: "column",
353812
- children: [
353813
- /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Box_default, { justifyContent: "space-between", children: [
353814
- /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Box_default, { children: [
353815
- isResponding ? /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Text3, { color: Colors.AccentCyan, children: [
353816
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(build_default, { type: "dots" }),
353817
- " "
353818
- ] }) : activeTodo ? /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Text3, { color: theme.status.success, children: [
353819
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(build_default, { type: "dots" }),
353820
- " "
353821
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Text3, { color: theme.text.secondary, children: "\u25CF " }),
353822
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Text3, { color: isResponding ? Colors.AccentCyan : theme.text.primary, bold: true, children: statusText }),
353823
- totalCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Text3, { color: theme.text.secondary, children: [
353824
- " ",
353825
- "(",
353826
- completedCount,
353827
- "/",
353828
- totalCount,
353829
- ")"
353830
- ] })
353831
- ] }),
353832
- /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Box_default, { gap: 2, children: [
353833
- /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Text3, { color: theme.text.secondary, children: [
353834
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Text3, { color: Colors.AccentPurple, children: "\u2191" }),
353835
- " ",
353836
- formatTokenCount(totalInputTokens)
353837
- ] }),
353838
- /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Text3, { color: theme.text.secondary, children: [
353839
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Text3, { color: Colors.AccentGreen, children: "\u2193" }),
353840
- " ",
353841
- formatTokenCount(totalOutputTokens)
353842
- ] }),
353843
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Text3, { color: theme.text.secondary, children: formatDuration(elapsedMs) })
353844
- ] })
353845
- ] }),
353846
- todos.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Box_default, { flexDirection: "column", marginTop: 0, paddingLeft: 1, children: [
353847
- todos.slice(0, 5).map((todo) => {
353848
- const isCompleted = todo.status === "completed";
353849
- const isInProgress = todo.status === "in_progress";
353850
- return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Box_default, { children: [
353851
- /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Text3, { color: isCompleted ? theme.text.secondary : isInProgress ? theme.status.success : theme.text.primary, children: [
353852
- isInProgress ? "\u251C\u2500" : isCompleted ? "\u2514\u2500" : "\u2502 ",
353853
- " ",
353854
- isInProgress ? "\u25D0" : STATUS_ICONS2[todo.status],
353855
- " "
353856
- ] }),
353857
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
353858
- Text3,
353859
- {
353860
- color: isCompleted ? theme.text.secondary : isInProgress ? theme.status.success : theme.text.primary,
353861
- dimColor: isCompleted,
353862
- strikethrough: isCompleted,
353863
- children: isInProgress && todo.activeForm ? todo.activeForm : todo.content
353864
- }
353865
- )
353866
- ] }, todo.id);
353867
- }),
353868
- todos.length > 5 && /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Text3, { color: theme.text.secondary, children: [
353869
- "\u2514\u2500 ... and ",
353870
- todos.length - 5,
353871
- " more"
353872
- ] })
353873
- ] })
353874
- ]
353875
- }
353876
- ),
353877
- computed.cacheEfficiency > 0 && totalTokens > 1e4 && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Box_default, { paddingLeft: 1, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Text3, { color: theme.text.secondary, dimColor: true, children: [
353878
- "\u{1F4BE} ",
353879
- computed.cacheEfficiency.toFixed(0),
353880
- "% cache efficiency"
353881
- ] }) })
353882
- ] });
353883
- }, "StatusBar");
353884
-
353885
- // packages/cli/src/ui/components/ConsultationPanel.tsx
353975
+ // packages/cli/src/ui/components/TaskMasterPanel.tsx
353886
353976
  init_esbuild_shims();
353977
+ var import_react102 = __toESM(require_react(), 1);
353887
353978
 
353888
353979
  // packages/cli/src/ui/contexts/ConsultationContext.tsx
353889
353980
  init_esbuild_shims();
353890
- var import_react102 = __toESM(require_react(), 1);
353891
- var import_jsx_runtime107 = __toESM(require_jsx_runtime(), 1);
353892
- var ConsultationContext = (0, import_react102.createContext)(null);
353981
+ var import_react101 = __toESM(require_react(), 1);
353982
+ var import_jsx_runtime106 = __toESM(require_jsx_runtime(), 1);
353983
+ var ConsultationContext = (0, import_react101.createContext)(null);
353893
353984
  function useConsultation() {
353894
- const context2 = (0, import_react102.useContext)(ConsultationContext);
353985
+ const context2 = (0, import_react101.useContext)(ConsultationContext);
353895
353986
  if (!context2) {
353896
353987
  throw new Error("useConsultation must be used within ConsultationProvider");
353897
353988
  }
@@ -353899,19 +353990,19 @@ function useConsultation() {
353899
353990
  }
353900
353991
  __name(useConsultation, "useConsultation");
353901
353992
  function ConsultationProvider({ children }) {
353902
- const [isActive, setIsActive] = (0, import_react102.useState)(true);
353903
- const [currentQuestion, setCurrentQuestion] = (0, import_react102.useState)(null);
353904
- const [questionQueue, setQuestionQueue] = (0, import_react102.useState)([]);
353905
- const [isBlocking, setIsBlocking] = (0, import_react102.useState)(false);
353906
- const [consultationMode, setConsultationModeState] = (0, import_react102.useState)("active");
353907
- const [collectedContext, setCollectedContext] = (0, import_react102.useState)({
353993
+ const [isActive, setIsActive] = (0, import_react101.useState)(true);
353994
+ const [currentQuestion, setCurrentQuestion] = (0, import_react101.useState)(null);
353995
+ const [questionQueue, setQuestionQueue] = (0, import_react101.useState)([]);
353996
+ const [isBlocking, setIsBlocking] = (0, import_react101.useState)(false);
353997
+ const [consultationMode, setConsultationModeState] = (0, import_react101.useState)("active");
353998
+ const [collectedContext, setCollectedContext] = (0, import_react101.useState)({
353908
353999
  questions: [],
353909
354000
  answers: /* @__PURE__ */ new Map(),
353910
354001
  projectContext: [],
353911
354002
  userPreferences: {}
353912
354003
  });
353913
354004
  const generateId = /* @__PURE__ */ __name(() => `q_${Date.now()}_${Math.random().toString(36).slice(2, 9)}`, "generateId");
353914
- const addQuestion = (0, import_react102.useCallback)((question) => {
354005
+ const addQuestion = (0, import_react101.useCallback)((question) => {
353915
354006
  const newQuestion = {
353916
354007
  ...question,
353917
354008
  id: generateId(),
@@ -353936,7 +354027,7 @@ function ConsultationProvider({ children }) {
353936
354027
  }
353937
354028
  }
353938
354029
  }, [currentQuestion, consultationMode]);
353939
- const answerQuestion = (0, import_react102.useCallback)((questionId, answer) => {
354030
+ const answerQuestion = (0, import_react101.useCallback)((questionId, answer) => {
353940
354031
  setCollectedContext((prev) => {
353941
354032
  const newAnswers = new Map(prev.answers);
353942
354033
  newAnswers.set(questionId, answer);
@@ -353961,7 +354052,7 @@ A: ${answer}`]
353961
354052
  return prev.slice(1);
353962
354053
  });
353963
354054
  }, []);
353964
- const skipQuestion = (0, import_react102.useCallback)((questionId) => {
354055
+ const skipQuestion = (0, import_react101.useCallback)((questionId) => {
353965
354056
  setQuestionQueue((prev) => {
353966
354057
  const filtered = prev.filter((q) => q.id !== questionId);
353967
354058
  const next = filtered[0] || null;
@@ -353972,14 +354063,14 @@ A: ${answer}`]
353972
354063
  return filtered.slice(1);
353973
354064
  });
353974
354065
  }, []);
353975
- const setConsultationMode = (0, import_react102.useCallback)((mode) => {
354066
+ const setConsultationMode = (0, import_react101.useCallback)((mode) => {
353976
354067
  setConsultationModeState(mode);
353977
354068
  setIsActive(mode !== "passive");
353978
354069
  if (mode !== "blocking") {
353979
354070
  setIsBlocking(false);
353980
354071
  }
353981
354072
  }, []);
353982
- const getContextForAgent = (0, import_react102.useCallback)(() => {
354073
+ const getContextForAgent = (0, import_react101.useCallback)(() => {
353983
354074
  const contextParts = [];
353984
354075
  if (collectedContext.projectContext.length > 0) {
353985
354076
  contextParts.push("## User-Provided Context\n");
@@ -353993,7 +354084,7 @@ A: ${answer}`]
353993
354084
  }
353994
354085
  return contextParts.join("\n");
353995
354086
  }, [collectedContext]);
353996
- const clearContext = (0, import_react102.useCallback)(() => {
354087
+ const clearContext = (0, import_react101.useCallback)(() => {
353997
354088
  setCollectedContext({
353998
354089
  questions: [],
353999
354090
  answers: /* @__PURE__ */ new Map(),
@@ -354004,7 +354095,7 @@ A: ${answer}`]
354004
354095
  setCurrentQuestion(null);
354005
354096
  setIsBlocking(false);
354006
354097
  }, []);
354007
- const setBlocking2 = (0, import_react102.useCallback)((blocking) => {
354098
+ const setBlocking2 = (0, import_react101.useCallback)((blocking) => {
354008
354099
  setIsBlocking(blocking);
354009
354100
  }, []);
354010
354101
  const value = {
@@ -354022,99 +354113,271 @@ A: ${answer}`]
354022
354113
  clearContext,
354023
354114
  setBlocking: setBlocking2
354024
354115
  };
354025
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(ConsultationContext.Provider, { value, children });
354116
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(ConsultationContext.Provider, { value, children });
354026
354117
  }
354027
354118
  __name(ConsultationProvider, "ConsultationProvider");
354028
354119
 
354029
- // packages/cli/src/ui/components/ConsultationPanel.tsx
354030
- var import_jsx_runtime108 = __toESM(require_jsx_runtime(), 1);
354031
- var PRIORITY_COLORS = {
354032
- high: Colors.AccentRed,
354033
- medium: Colors.AccentYellow,
354034
- low: Colors.Gray
354035
- };
354036
- var CATEGORY_LABELS = {
354037
- architecture: "\u{1F3D7}\uFE0F",
354038
- requirements: "\u{1F4CB}",
354039
- clarification: "\u2753",
354040
- preference: "\u2699\uFE0F"
354120
+ // packages/cli/src/ui/components/TaskMasterPanel.tsx
354121
+ var import_jsx_runtime107 = __toESM(require_jsx_runtime(), 1);
354122
+ var STATUS_ICONS2 = {
354123
+ pending: "\u25CB",
354124
+ in_progress: "\u25D0",
354125
+ completed: "\u25CF"
354041
354126
  };
354042
- var ConsultationPanel = /* @__PURE__ */ __name(() => {
354043
- const { questionQueue, currentQuestion, isActive, consultationMode } = useConsultation();
354044
- if (!isActive || !currentQuestion && questionQueue.length === 0) {
354045
- return null;
354127
+ function formatTokenCount(count) {
354128
+ if (count >= 1e6) {
354129
+ return `${(count / 1e6).toFixed(1)}M`;
354046
354130
  }
354131
+ if (count >= 1e3) {
354132
+ return `${(count / 1e3).toFixed(1)}k`;
354133
+ }
354134
+ return String(count);
354135
+ }
354136
+ __name(formatTokenCount, "formatTokenCount");
354137
+ var TaskMasterPanel = /* @__PURE__ */ __name(({
354138
+ compact = false
354139
+ }) => {
354140
+ const { todos, getActiveTodo } = useTodos();
354141
+ const { stats } = useSessionStats();
354142
+ const streamingState = useStreamingContext();
354143
+ const { questionQueue, currentQuestion, isActive: consultationActive } = useConsultation();
354144
+ const [elapsedMs, setElapsedMs] = (0, import_react102.useState)(0);
354145
+ const [subagentComments, setSubagentComments] = (0, import_react102.useState)([]);
354146
+ const [stuckWarning, setStuckWarning] = (0, import_react102.useState)(false);
354147
+ const respondingStartRef = (0, import_react102.useRef)(null);
354148
+ const lastStateRef = (0, import_react102.useRef)(streamingState);
354149
+ (0, import_react102.useEffect)(() => {
354150
+ if (streamingState !== lastStateRef.current) {
354151
+ lastStateRef.current = streamingState;
354152
+ setStuckWarning(false);
354153
+ if (streamingState === "responding" /* Responding */) {
354154
+ respondingStartRef.current = Date.now();
354155
+ } else {
354156
+ respondingStartRef.current = null;
354157
+ }
354158
+ }
354159
+ }, [streamingState]);
354160
+ (0, import_react102.useEffect)(() => {
354161
+ const interval = setInterval(() => {
354162
+ setElapsedMs(Date.now() - stats.sessionStartTime.getTime());
354163
+ if (streamingState === "responding" /* Responding */ && respondingStartRef.current) {
354164
+ if (Date.now() - respondingStartRef.current > 5 * 60 * 1e3) {
354165
+ setStuckWarning(true);
354166
+ }
354167
+ }
354168
+ }, 1e3);
354169
+ return () => clearInterval(interval);
354170
+ }, [stats.sessionStartTime, streamingState]);
354171
+ (0, import_react102.useEffect)(() => {
354172
+ const activeTodo2 = getActiveTodo();
354173
+ if (activeTodo2 && streamingState === "responding" /* Responding */) {
354174
+ const existingComment = subagentComments.find((c3) => c3.id === activeTodo2.id);
354175
+ if (!existingComment) {
354176
+ setSubagentComments((prev) => [
354177
+ ...prev.slice(-4),
354178
+ // Keep last 4 comments
354179
+ {
354180
+ id: activeTodo2.id,
354181
+ agent: "coder",
354182
+ message: `Working on: ${activeTodo2.activeForm || activeTodo2.content}`,
354183
+ timestamp: Date.now(),
354184
+ type: "info"
354185
+ }
354186
+ ]);
354187
+ }
354188
+ }
354189
+ }, [todos, streamingState, getActiveTodo, subagentComments]);
354190
+ const activeTodo = getActiveTodo();
354191
+ const computed = computeSessionStats(stats.metrics);
354192
+ const isResponding = streamingState === "responding" /* Responding */;
354193
+ let totalInputTokens = 0;
354194
+ let totalOutputTokens = 0;
354195
+ for (const model of Object.values(stats.metrics.models)) {
354196
+ totalInputTokens += model.tokens.prompt;
354197
+ totalOutputTokens += model.tokens.candidates;
354198
+ }
354199
+ const completedCount = todos.filter((t3) => t3.status === "completed").length;
354200
+ const totalCount = todos.length;
354201
+ const progressPercent = totalCount > 0 ? Math.round(completedCount / totalCount * 100) : 0;
354047
354202
  const allQuestions = currentQuestion ? [currentQuestion, ...questionQueue.filter((q) => q.id !== currentQuestion.id)] : questionQueue;
354048
- if (allQuestions.length === 0) {
354203
+ if (!isResponding && todos.length === 0 && subagentComments.length === 0) {
354049
354204
  return null;
354050
354205
  }
354051
- return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
354052
- Box_default,
354053
- {
354054
- flexDirection: "column",
354055
- borderStyle: "round",
354056
- borderColor: Colors.AccentYellow,
354057
- paddingX: 1,
354058
- marginBottom: 1,
354059
- children: [
354060
- /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(Box_default, { justifyContent: "space-between", children: [
354061
- /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Text3, { color: Colors.AccentYellow, bold: true, children: "\u{1F4DD} Consultation Questions" }),
354062
- /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(Text3, { color: theme.text.secondary, children: [
354063
- consultationMode,
354064
- " mode \xB7 ",
354065
- allQuestions.length,
354066
- " pending"
354067
- ] })
354068
- ] }),
354069
- /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
354070
- allQuestions.slice(0, 3).map((question, index) => /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(Box_default, { flexDirection: "column", marginBottom: index < allQuestions.length - 1 ? 1 : 0, children: [
354071
- /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(Box_default, { children: [
354072
- /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(Text3, { color: PRIORITY_COLORS[question.priority], children: [
354073
- CATEGORY_LABELS[question.category] || "\u2022",
354206
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
354207
+ isResponding && subagentComments.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
354208
+ Box_default,
354209
+ {
354210
+ flexDirection: "column",
354211
+ borderStyle: "single",
354212
+ borderColor: theme.border.default,
354213
+ paddingX: 1,
354214
+ marginBottom: 1,
354215
+ children: [
354216
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Text3, { color: theme.text.secondary, dimColor: true, children: "\u{1F4E1} Agent Activity" }),
354217
+ subagentComments.slice(-3).map((comment) => /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Text3, { color: getCommentColor(comment.type), children: [
354218
+ "[",
354219
+ comment.agent,
354220
+ "] ",
354221
+ comment.message
354222
+ ] }) }, comment.id))
354223
+ ]
354224
+ }
354225
+ ),
354226
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
354227
+ Box_default,
354228
+ {
354229
+ borderStyle: "round",
354230
+ borderColor: isResponding ? Colors.AccentCyan : theme.border.default,
354231
+ paddingX: 1,
354232
+ flexDirection: "column",
354233
+ children: [
354234
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Box_default, { justifyContent: "space-between", children: [
354235
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Box_default, { children: [
354236
+ isResponding ? /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Text3, { color: Colors.AccentCyan, children: [
354237
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(build_default, { type: "dots" }),
354074
354238
  " "
354075
- ] }),
354076
- /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Text3, { color: index === 0 ? Colors.AccentYellow : theme.text.primary, children: question.question })
354239
+ ] }) : activeTodo ? /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Text3, { color: theme.status.success, children: [
354240
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(build_default, { type: "dots" }),
354241
+ " "
354242
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Text3, { color: theme.text.secondary, children: "\u25CF " }),
354243
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Text3, { color: isResponding ? Colors.AccentCyan : theme.text.primary, bold: true, children: "Taskmaster" }),
354244
+ totalCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Text3, { color: theme.text.secondary, children: [
354245
+ " ",
354246
+ "(",
354247
+ completedCount,
354248
+ "/",
354249
+ totalCount,
354250
+ ")"
354251
+ ] })
354077
354252
  ] }),
354078
- question.context && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Box_default, { paddingLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Text3, { color: theme.text.secondary, dimColor: true, children: question.context }) })
354079
- ] }, question.id)),
354080
- allQuestions.length > 3 && /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(Text3, { color: theme.text.secondary, children: [
354081
- "... and ",
354082
- allQuestions.length - 3,
354083
- " more questions"
354253
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Box_default, { gap: 2, children: [
354254
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Text3, { color: theme.text.secondary, children: [
354255
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Text3, { color: Colors.AccentPurple, children: "\u2191" }),
354256
+ " ",
354257
+ formatTokenCount(totalInputTokens)
354258
+ ] }),
354259
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Text3, { color: theme.text.secondary, children: [
354260
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Text3, { color: Colors.AccentGreen, children: "\u2193" }),
354261
+ " ",
354262
+ formatTokenCount(totalOutputTokens)
354263
+ ] }),
354264
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Text3, { color: theme.text.secondary, children: formatDuration(elapsedMs) })
354265
+ ] })
354266
+ ] }),
354267
+ activeTodo && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Box_default, { marginTop: 0, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Text3, { color: Colors.AccentCyan, children: activeTodo.activeForm || activeTodo.content }) }),
354268
+ totalCount > 0 && !compact && /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Box_default, { marginTop: 1, children: [
354269
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Text3, { color: theme.status.success, children: "\u2588".repeat(Math.round(progressPercent / 100 * 20)) }),
354270
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Text3, { color: theme.text.secondary, children: "\u2591".repeat(20 - Math.round(progressPercent / 100 * 20)) }),
354271
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Text3, { color: theme.text.secondary, children: [
354272
+ " ",
354273
+ progressPercent,
354274
+ "%"
354275
+ ] })
354276
+ ] }),
354277
+ todos.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, paddingLeft: 1, children: [
354278
+ todos.slice(0, compact ? 3 : 5).map((todo, idx) => {
354279
+ const isCompleted = todo.status === "completed";
354280
+ const isInProgress = todo.status === "in_progress";
354281
+ const isLast = idx === Math.min(todos.length, compact ? 3 : 5) - 1;
354282
+ const color = isCompleted ? theme.text.secondary : isInProgress ? theme.status.success : theme.text.primary;
354283
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Box_default, { children: [
354284
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Text3, { color, children: [
354285
+ isLast ? "\u2514\u2500" : "\u251C\u2500",
354286
+ " ",
354287
+ isInProgress ? "\u25D0" : STATUS_ICONS2[todo.status],
354288
+ " "
354289
+ ] }),
354290
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
354291
+ Text3,
354292
+ {
354293
+ color,
354294
+ dimColor: isCompleted,
354295
+ strikethrough: isCompleted,
354296
+ children: isInProgress && todo.activeForm ? todo.activeForm : todo.content
354297
+ }
354298
+ )
354299
+ ] }, todo.id);
354300
+ }),
354301
+ todos.length > (compact ? 3 : 5) && /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Text3, { color: theme.text.secondary, children: [
354302
+ "\u2514\u2500 ... and ",
354303
+ todos.length - (compact ? 3 : 5),
354304
+ " more"
354305
+ ] })
354084
354306
  ] })
354085
- ] }),
354086
- /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Text3, { color: theme.text.secondary, dimColor: true, children: "Answer questions to help the agent understand your needs better" }) })
354087
- ]
354088
- }
354089
- );
354090
- }, "ConsultationPanel");
354307
+ ]
354308
+ }
354309
+ ),
354310
+ consultationActive && allQuestions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
354311
+ Box_default,
354312
+ {
354313
+ flexDirection: "column",
354314
+ borderStyle: "round",
354315
+ borderColor: Colors.AccentYellow,
354316
+ paddingX: 1,
354317
+ marginTop: 1,
354318
+ children: [
354319
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Box_default, { justifyContent: "space-between", children: [
354320
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Text3, { color: Colors.AccentYellow, bold: true, children: "\u{1F4DD} Questions for You" }),
354321
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Text3, { color: theme.text.secondary, children: [
354322
+ allQuestions.length,
354323
+ " pending"
354324
+ ] })
354325
+ ] }),
354326
+ allQuestions.slice(0, 2).map((q) => /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Box_default, { marginTop: 0, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Text3, { color: Colors.AccentYellow, children: [
354327
+ "\u2022 ",
354328
+ q.question
354329
+ ] }) }, q.id)),
354330
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Text3, { color: theme.text.secondary, dimColor: true, children: "Answer in the chat to provide context" })
354331
+ ]
354332
+ }
354333
+ ),
354334
+ stuckWarning && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Box_default, { paddingLeft: 1, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Text3, { color: Colors.AccentYellow, children: "\u26A0\uFE0F Operation seems stuck. Press ESC to cancel." }) }),
354335
+ computed.cacheEfficiency > 0 && totalInputTokens + totalOutputTokens > 1e4 && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Box_default, { paddingLeft: 1, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Text3, { color: theme.text.secondary, dimColor: true, children: [
354336
+ "\u{1F4BE} ",
354337
+ computed.cacheEfficiency.toFixed(0),
354338
+ "% cache efficiency"
354339
+ ] }) })
354340
+ ] });
354341
+ }, "TaskMasterPanel");
354342
+ function getCommentColor(type) {
354343
+ switch (type) {
354344
+ case "success":
354345
+ return Colors.AccentGreen;
354346
+ case "warning":
354347
+ return Colors.AccentYellow;
354348
+ case "error":
354349
+ return Colors.AccentRed;
354350
+ default:
354351
+ return theme.text.secondary;
354352
+ }
354353
+ }
354354
+ __name(getCommentColor, "getCommentColor");
354091
354355
 
354092
354356
  // packages/cli/src/ui/layouts/DefaultAppLayout.tsx
354093
- var import_jsx_runtime109 = __toESM(require_jsx_runtime(), 1);
354357
+ var import_jsx_runtime108 = __toESM(require_jsx_runtime(), 1);
354094
354358
  var DefaultAppLayout = /* @__PURE__ */ __name(({
354095
354359
  width = "90%"
354096
354360
  }) => {
354097
354361
  const uiState = useUIState();
354098
- return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(Box_default, { flexDirection: "column", width, children: [
354099
- /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(MainContent, {}),
354100
- /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(Box_default, { flexDirection: "column", ref: uiState.mainControlsRef, children: [
354101
- /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Notifications, {}),
354102
- /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(StatusBar, {}),
354103
- /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(ConsultationPanel, {}),
354104
- uiState.dialogsVisible ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
354362
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(Box_default, { flexDirection: "column", width, children: [
354363
+ /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(MainContent, {}),
354364
+ /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(Box_default, { flexDirection: "column", ref: uiState.mainControlsRef, children: [
354365
+ /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Notifications, {}),
354366
+ /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(TaskMasterPanel, { compact: true }),
354367
+ uiState.dialogsVisible ? /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
354105
354368
  DialogManager,
354106
354369
  {
354107
354370
  terminalWidth: uiState.terminalWidth,
354108
354371
  addItem: uiState.historyManager.addItem
354109
354372
  }
354110
- ) : /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Composer, {}),
354111
- /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(ExitWarning, {})
354373
+ ) : /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Composer, {}),
354374
+ /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(ExitWarning, {})
354112
354375
  ] })
354113
354376
  ] });
354114
354377
  }, "DefaultAppLayout");
354115
354378
 
354116
354379
  // packages/cli/src/ui/App.tsx
354117
- var import_jsx_runtime110 = __toESM(require_jsx_runtime(), 1);
354380
+ var import_jsx_runtime109 = __toESM(require_jsx_runtime(), 1);
354118
354381
  var getContainerWidth = /* @__PURE__ */ __name((terminalWidth) => {
354119
354382
  if (terminalWidth <= 80) {
354120
354383
  return "98%";
@@ -354132,9 +354395,9 @@ var App2 = /* @__PURE__ */ __name(() => {
354132
354395
  const { columns } = useTerminalSize();
354133
354396
  const containerWidth = getContainerWidth(columns);
354134
354397
  if (uiState.quittingMessages) {
354135
- return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(QuittingDisplay, {});
354398
+ return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(QuittingDisplay, {});
354136
354399
  }
354137
- return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(StreamingContext.Provider, { value: uiState.streamingState, children: isScreenReaderEnabled ? /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(ScreenReaderAppLayout, {}) : /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(DefaultAppLayout, { width: containerWidth }) });
354400
+ return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(StreamingContext.Provider, { value: uiState.streamingState, children: isScreenReaderEnabled ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(ScreenReaderAppLayout, {}) : /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(DefaultAppLayout, { width: containerWidth }) });
354138
354401
  }, "App");
354139
354402
 
354140
354403
  // packages/cli/src/ui/AppContainer.tsx
@@ -361805,7 +362068,7 @@ var useAttentionNotifications = /* @__PURE__ */ __name(({
361805
362068
  }, "useAttentionNotifications");
361806
362069
 
361807
362070
  // packages/cli/src/ui/AppContainer.tsx
361808
- var import_jsx_runtime111 = __toESM(require_jsx_runtime(), 1);
362071
+ var import_jsx_runtime110 = __toESM(require_jsx_runtime(), 1);
361809
362072
  var CTRL_EXIT_PROMPT_DURATION_MS = 1e3;
361810
362073
  function isToolExecuting(pendingHistoryItems) {
361811
362074
  return pendingHistoryItems.some((item) => {
@@ -362882,14 +363145,14 @@ ${queuedText}` : queuedText;
362882
363145
  closeAgentsManagerDialog
362883
363146
  ]
362884
363147
  );
362885
- return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(UIStateContext.Provider, { value: uiState, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(UIActionsContext.Provider, { value: uiActions, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(ConfigContext.Provider, { value: config, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
363148
+ return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(UIStateContext.Provider, { value: uiState, children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(UIActionsContext.Provider, { value: uiActions, children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(ConfigContext.Provider, { value: config, children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
362886
363149
  AppContext2.Provider,
362887
363150
  {
362888
363151
  value: {
362889
363152
  version: props.version,
362890
363153
  startupWarnings: props.startupWarnings || []
362891
363154
  },
362892
- children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(ShellFocusContext.Provider, { value: isFocused, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(App2, {}) })
363155
+ children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(ShellFocusContext.Provider, { value: isFocused, children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(App2, {}) })
362893
363156
  }
362894
363157
  ) }) }) });
362895
363158
  }, "AppContainer");
@@ -365554,7 +365817,7 @@ function toPermissionOptions(confirmation) {
365554
365817
  __name(toPermissionOptions, "toPermissionOptions");
365555
365818
 
365556
365819
  // packages/cli/src/gemini.tsx
365557
- var import_jsx_runtime112 = __toESM(require_jsx_runtime(), 1);
365820
+ var import_jsx_runtime111 = __toESM(require_jsx_runtime(), 1);
365558
365821
  function validateDnsResolutionOrder(order) {
365559
365822
  const defaultValue = "ipv4first";
365560
365823
  if (order === void 0) {
@@ -365619,14 +365882,14 @@ async function startInteractiveUI(config, settings, startupWarnings, workspaceRo
365619
365882
  const AppWrapper = /* @__PURE__ */ __name(() => {
365620
365883
  const kittyProtocolStatus = useKittyKeyboardProtocol();
365621
365884
  const nodeMajorVersion = parseInt(process.versions.node.split(".")[0], 10);
365622
- return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(SettingsContext.Provider, { value: settings, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
365885
+ return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(SettingsContext.Provider, { value: settings, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
365623
365886
  KeypressProvider,
365624
365887
  {
365625
365888
  kittyProtocolEnabled: kittyProtocolStatus.enabled,
365626
365889
  config,
365627
365890
  debugKeystrokeLogging: settings.merged.general?.debugKeystrokeLogging,
365628
365891
  pasteWorkaround: process.platform === "win32" || nodeMajorVersion < 20,
365629
- children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(SessionStatsProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(ConsultationProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(TodoProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(VimModeProvider, { settings, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
365892
+ children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(SessionStatsProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(ConsultationProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(TodoProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(VimModeProvider, { settings, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
365630
365893
  AppContainer,
365631
365894
  {
365632
365895
  config,
@@ -365640,7 +365903,7 @@ async function startInteractiveUI(config, settings, startupWarnings, workspaceRo
365640
365903
  ) });
365641
365904
  }, "AppWrapper");
365642
365905
  const instance = render_default(
365643
- process.env["DEBUG"] ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_react140.default.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(AppWrapper, {}) }) : /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(AppWrapper, {}),
365906
+ process.env["DEBUG"] ? /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react140.default.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(AppWrapper, {}) }) : /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(AppWrapper, {}),
365644
365907
  {
365645
365908
  exitOnCtrlC: false,
365646
365909
  isScreenReaderEnabled: config.getScreenReader()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "osagent",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
4
4
  "description": "OS Agent - AI-powered CLI for autonomous coding with Ollama Cloud and Qwen models",
5
5
  "author": "Roberto Luna",
6
6
  "license": "Apache-2.0",