From c841bcda269b184ad2bdcb277a2cdeac8f8a64bf Mon Sep 17 00:00:00 2001 From: code-crusher Date: Wed, 18 Mar 2026 22:08:38 +0530 Subject: [PATCH 1/4] feat: add command execution timer with running/completed status - Add startTime to CommandExecutionStatus schema in types package - Track command start time in executeCommandTool and send to webview - Display "Running Command for Xs" with blinking green dot while executing - Display "Command Ran for Xs" with exit code indicator when completed - Consolidate status display on left side, remove duplicate text --- packages/types/src/terminal.ts | 1 + src/core/tools/executeCommandTool.ts | 8 +- src/package.json | 2 +- .../src/components/chat/CommandExecution.tsx | 92 ++++++++++++++----- 4 files changed, 78 insertions(+), 25 deletions(-) diff --git a/packages/types/src/terminal.ts b/packages/types/src/terminal.ts index ffa1ffe781..5018f75308 100644 --- a/packages/types/src/terminal.ts +++ b/packages/types/src/terminal.ts @@ -10,6 +10,7 @@ export const commandExecutionStatusSchema = z.discriminatedUnion("status", [ status: z.literal("started"), pid: z.number().optional(), command: z.string(), + startTime: z.number().optional(), }), z.object({ executionId: z.string(), diff --git a/src/core/tools/executeCommandTool.ts b/src/core/tools/executeCommandTool.ts index 056d1cdda2..5ebf79d57e 100644 --- a/src/core/tools/executeCommandTool.ts +++ b/src/core/tools/executeCommandTool.ts @@ -221,7 +221,13 @@ export async function executeCommand( }, onShellExecutionStarted: (pid: number | undefined) => { console.log(`[executeCommand] onShellExecutionStarted: ${pid}`) - const status: CommandExecutionStatus = { executionId, status: "started", pid, command } + const status: CommandExecutionStatus = { + executionId, + status: "started", + pid, + command, + startTime: Date.now(), + } provider?.postMessageToWebview({ type: "commandExecutionStatus", text: JSON.stringify(status) }) }, onShellExecutionComplete: (details: ExitCodeDetails) => { diff --git a/src/package.json b/src/package.json index 893f6a8829..cc0e23e80b 100644 --- a/src/package.json +++ b/src/package.json @@ -3,7 +3,7 @@ "displayName": "%extension.displayName%", "description": "%extension.description%", "publisher": "matterai", - "version": "5.6.9", + "version": "5.7.0", "icon": "assets/icons/matterai-ic.png", "galleryBanner": { "color": "#FFFFFF", diff --git a/webview-ui/src/components/chat/CommandExecution.tsx b/webview-ui/src/components/chat/CommandExecution.tsx index 67569017a0..fc9ecc41a7 100644 --- a/webview-ui/src/components/chat/CommandExecution.tsx +++ b/webview-ui/src/components/chat/CommandExecution.tsx @@ -1,5 +1,5 @@ import { ChevronDown, OctagonX } from "lucide-react" -import { memo, useCallback, useMemo, useState } from "react" +import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react" import { useEvent } from "react-use" import { CommandExecutionStatus, commandExecutionStatusSchema } from "@roo-code/types" @@ -65,6 +65,9 @@ export const CommandExecution = memo( const [isExpanded, setIsExpanded] = useState(terminalShellIntegrationDisabled) const [streamingOutput, setStreamingOutput] = useState("") const [status, setStatus] = useState(null) + const [elapsedSeconds, setElapsedSeconds] = useState(0) + const [completedSeconds, setCompletedSeconds] = useState(null) + const startTimeRef = useRef(null) // The command's output can either come from the text associated with the // task message (this is the case for completed commands) or from the @@ -136,6 +139,7 @@ export const CommandExecution = memo( switch (data.status) { case "started": + startTimeRef.current = data.startTime ?? null setStatus(data) break case "output": @@ -156,45 +160,87 @@ export const CommandExecution = memo( useEvent("message", onMessage) + // Timer effect for showing "Running for X seconds" + useEffect(() => { + if (status?.status === "started" && startTimeRef.current) { + const startTime = startTimeRef.current + + // Update elapsed time every second + const interval = setInterval(() => { + const elapsed = Math.floor((Date.now() - startTime) / 1000) + setElapsedSeconds(elapsed) + }, 1000) + + // Initial calculation + setElapsedSeconds(Math.floor((Date.now() - startTime) / 1000)) + + return () => clearInterval(interval) + } + }, [status]) + + // Calculate final duration when command completes + useEffect(() => { + if (status?.status === "exited" && startTimeRef.current) { + const elapsed = Math.floor((Date.now() - startTimeRef.current) / 1000) + setCompletedSeconds(elapsed) + } + }, [status]) + return ( <>
- {icon} - {title} - {status?.status === "exited" && ( -
+ {/* Status display: running, completed, or initial */} + {status?.status === "started" ? ( +
+
+ Running Command for {elapsedSeconds}s + {status.pid && ( + (PID: {status.pid}) + )} +
+ ) : status?.status === "exited" ? ( +
+ Command + {completedSeconds !== null && ( + + Ran for {completedSeconds}s + + )}
+ ) : ( + <> + {icon} + {title} + )}
-
+
+ {/* Abort button when running */} {status?.status === "started" && ( -
- {status.pid &&
(PID: {status.pid})
} - - - -
+ + + )} {output.length > 0 && ( From a6167dcf32ea3515fdb379d669a7b9ee90d25277 Mon Sep 17 00:00:00 2001 From: code-crusher Date: Fri, 20 Mar 2026 08:59:55 +0530 Subject: [PATCH 2/4] remove axon 1 model --- src/api/providers/kilocode-models.ts | 34 ------------------- .../ui/hooks/useOpenRouterModelProviders.ts | 34 ------------------- 2 files changed, 68 deletions(-) diff --git a/src/api/providers/kilocode-models.ts b/src/api/providers/kilocode-models.ts index c40c5e25dd..5638377c76 100644 --- a/src/api/providers/kilocode-models.ts +++ b/src/api/providers/kilocode-models.ts @@ -61,40 +61,6 @@ export const KILO_CODE_MODELS: Record = { input_cache_writes: "0", }, }, - "axon-code": { - id: "axon-code", - name: "Axon Code 1.3", - description: "Axon Code is super intelligent LLM model for coding tasks", - input_modalities: ["text", "image"], - context_length: 200000, - max_output_length: 32768, - output_modalities: ["text"], - supported_sampling_parameters: [ - "temperature", - "top_p", - "top_k", - "repetition_penalty", - "frequency_penalty", - "presence_penalty", - "seed", - "stop", - ], - supported_features: ["tools", "structured_outputs", "web_search"], - openrouter: { - slug: "matterai/axon", - }, - datacenters: [{ country_code: "US" }], - created: 1750426201, - owned_by: "matterai", - pricing: { - prompt: "0.0", - completion: "0.0", - image: "0", - request: "0", - input_cache_reads: "0", - input_cache_writes: "0", - }, - }, "axon-code-2": { id: "axon-code-2", name: "Axon Code 2.1", diff --git a/webview-ui/src/components/ui/hooks/useOpenRouterModelProviders.ts b/webview-ui/src/components/ui/hooks/useOpenRouterModelProviders.ts index ef50f83d2d..389a40142a 100644 --- a/webview-ui/src/components/ui/hooks/useOpenRouterModelProviders.ts +++ b/webview-ui/src/components/ui/hooks/useOpenRouterModelProviders.ts @@ -72,40 +72,6 @@ const KILO_CODE_MODELS: Record = { input_cache_writes: "0", }, }, - "axon-code": { - id: "axon-code", - name: "Axon Code 1.3", - description: "Axon Code is super intelligent LLM model for coding tasks", - input_modalities: ["text", "image"], - context_length: 200000, - max_output_length: 32768, - output_modalities: ["text"], - supported_sampling_parameters: [ - "temperature", - "top_p", - "top_k", - "repetition_penalty", - "frequency_penalty", - "presence_penalty", - "seed", - "stop", - ], - supported_features: ["tools", "structured_outputs", "web_search"], - openrouter: { - slug: "matterai/axon", - }, - datacenters: [{ country_code: "US" }], - created: 1750426201, - owned_by: "matterai", - pricing: { - prompt: "0.0", - completion: "0.0", - image: "0", - request: "0", - input_cache_reads: "0", - input_cache_writes: "0", - }, - }, "axon-code-2": { id: "axon-code-2", name: "Axon Code 2.1", From 26399c84cd612e65f034105f471286ce8ac0b935 Mon Sep 17 00:00:00 2001 From: code-crusher Date: Fri, 20 Mar 2026 10:23:18 +0530 Subject: [PATCH 3/4] feat: update chat UI components --- webview-ui/src/components/chat/ChatView.tsx | 57 ++++++++++++++++++++- webview-ui/src/index.css | 6 +++ 2 files changed, 61 insertions(+), 2 deletions(-) diff --git a/webview-ui/src/components/chat/ChatView.tsx b/webview-ui/src/components/chat/ChatView.tsx index 61ba30460d..a938b29ece 100644 --- a/webview-ui/src/components/chat/ChatView.tsx +++ b/webview-ui/src/components/chat/ChatView.tsx @@ -34,7 +34,7 @@ import { getAllModes } from "@roo/modes" import { ProfileValidator } from "@roo/ProfileValidator" import { safeJsonParse } from "@roo/safeJsonParse" import { getLatestTodo } from "@roo/todo" -import { AudioType } from "@roo/WebviewMessage" +import { AudioType, ProfileData, WebviewMessage } from "@roo/WebviewMessage" import { useSelectedModel } from "@src/components/ui/hooks/useSelectedModel" import { useExtensionState } from "@src/context/ExtensionStateContext" @@ -273,6 +273,36 @@ const ChatViewComponent: React.ForwardRefRenderFunction(null) + + // Fetch profile data for usage tracking + useEffect(() => { + if (apiConfiguration?.kilocodeToken) { + vscode.postMessage({ type: "fetchProfileDataRequest" }) + } + }, [apiConfiguration?.kilocodeToken]) + + // Listen for profile data response + useEffect(() => { + const handleMessage = (event: MessageEvent) => { + const message = event.data + if (message.type === "profileDataResponse") { + const payload = message.payload as any + if (payload?.success && payload.data) { + setProfileData(payload.data) + } + } + } + + window.addEventListener("message", handleMessage) + return () => window.removeEventListener("message", handleMessage) + }, []) + + // Check if usage is over 98% (near exhaustion warning) + const isUsageExhausted = + profileData && typeof profileData.usagePercentage === "number" && profileData.usagePercentage >= 98 + const clineAskRef = useRef(clineAsk) useEffect(() => { clineAskRef.current = clineAsk @@ -2664,11 +2694,34 @@ const ChatViewComponent: React.ForwardRefRenderFunction )} + {/* kilocode_change: Show notification when monthly limit is exhausted */} + {isUsageExhausted && ( +
+
+
+ + You are out of Orbital Credits + + + To continue using Orbital, upgrade your plan or switch to Auto model. + +
+ +
+
+ )} + {!task && (
{ setShowSourceControl(true) // If there's an error, automatically retry when opening diff --git a/webview-ui/src/index.css b/webview-ui/src/index.css index 6e64dcc508..16c0ebb628 100644 --- a/webview-ui/src/index.css +++ b/webview-ui/src/index.css @@ -52,6 +52,12 @@ background: var(--vscode-button-secondaryHoverBackground) !important; } + /* Code Review Button Override */ + vscode-button.code-review-btn, + vscode-button.code-review-btn::part(control) { + border: 0.5px solid var(--vscode-panel-border) !important; + } + /* DangerButton Custom Style */ vscode-button[data-variant="danger"], vscode-button[data-variant="danger"]::part(control), From 1b77e0732191003e0f0f11bb272ce8328ffb13a5 Mon Sep 17 00:00:00 2001 From: code-crusher Date: Fri, 20 Mar 2026 12:10:22 +0530 Subject: [PATCH 4/4] clean up UI --- webview-ui/src/components/chat/ChatRow.tsx | 59 ++++++------------- webview-ui/src/components/chat/ChatView.tsx | 2 +- .../components/kilocode/StickyUserMessage.tsx | 2 +- 3 files changed, 21 insertions(+), 42 deletions(-) diff --git a/webview-ui/src/components/chat/ChatRow.tsx b/webview-ui/src/components/chat/ChatRow.tsx index e75d5bd18d..8c3b333085 100644 --- a/webview-ui/src/components/chat/ChatRow.tsx +++ b/webview-ui/src/components/chat/ChatRow.tsx @@ -1495,48 +1495,27 @@ export const ChatRowContent = ({ if (isOutOfCreditsMessage) { return ( -
-
- -
- Your plan is out of credits +
+
+
+ + You are out of Orbital Credits + + + To continue using Orbital, upgrade your plan or switch to Auto model. +
+
-
- Purchase or upgrade your paid plan to continue using the service. -
- { - e.preventDefault() - vscode.postMessage({ - type: "openInBrowser", - url: "https://app.matterai.so/billing?tab=axon-code", - }) - }}> - Purchase / Upgrade Plan -
) } diff --git a/webview-ui/src/components/chat/ChatView.tsx b/webview-ui/src/components/chat/ChatView.tsx index a938b29ece..ed94a20bc5 100644 --- a/webview-ui/src/components/chat/ChatView.tsx +++ b/webview-ui/src/components/chat/ChatView.tsx @@ -2695,7 +2695,7 @@ const ChatViewComponent: React.ForwardRefRenderFunction
diff --git a/webview-ui/src/components/kilocode/StickyUserMessage.tsx b/webview-ui/src/components/kilocode/StickyUserMessage.tsx index 427c7e45db..cf81ab4a9d 100644 --- a/webview-ui/src/components/kilocode/StickyUserMessage.tsx +++ b/webview-ui/src/components/kilocode/StickyUserMessage.tsx @@ -65,7 +65,7 @@ const StickyUserMessage = ({ task, messages, stickyIndex }: StickyUserMessagePro return (