Browse Source

Merge branch 'main' into catrielmuller/turbo-remote-cache

Catriel Müller 6 tháng trước cách đây
mục cha
commit
a351aef8a7

+ 2 - 1
apps/storybook/package.json

@@ -12,6 +12,7 @@
 		"clean": "rimraf storybook-static .turbo stories/generated public/screenshots"
 	},
 	"dependencies": {
+		"@roo-code/types": "workspace:^",
 		"@radix-ui/react-slot": "^1.1.2",
 		"@tanstack/react-query": "^5.62.7",
 		"@vscode/codicons": "^0.0.36",
@@ -48,4 +49,4 @@
 		"vite": "6.3.5",
 		"@storybook/addon-docs": "^9.0.18"
 	}
-}
+}

+ 1 - 1
apps/storybook/src/mockData/clineMessages.ts

@@ -1,4 +1,4 @@
-import type { ClineMessage } from "../../../../src/exports/types"
+import { ClineMessage } from "@roo-code/types"
 import { randomInterval } from "../utils/randomUtils"
 
 // Fixed base timestamp for consistent snapshots (January 1, 2024, 12:00:00 UTC)

+ 5 - 5
apps/storybook/stories/ChatView.stories.tsx

@@ -4,7 +4,7 @@ import type { Meta, StoryObj } from "@storybook/react-vite"
 import { fn } from "storybook/test"
 
 import ChatView from "../../../webview-ui/src/components/chat/ChatView"
-import { createTaskHeaderMessages, createMockTask } from "../src/mockData/clineMessages"
+import { createTaskHeaderMessages, createMockTask, BASE_TIMESTAMP } from "../src/mockData/clineMessages"
 
 const meta = {
 	title: "Chat/ChatView",
@@ -57,7 +57,7 @@ export const Default: Story = {
 			dismissedNotificationIds: [], // Add this for consistency
 			currentTaskItem: {
 				id: "task-1",
-				ts: Date.now(),
+				ts: BASE_TIMESTAMP,
 				task: "Create a React component with TypeScript",
 				tokensIn: 1250,
 				tokensOut: 850,
@@ -74,7 +74,7 @@ export const Default: Story = {
 			taskHistory: [
 				{
 					id: "task-1",
-					ts: Date.now() - 3600000,
+					ts: BASE_TIMESTAMP - 3600000, // 1 hour ago
 					task: "Previous completed task",
 					tokensIn: 800,
 					tokensOut: 600,
@@ -176,7 +176,7 @@ export const EmptyWithNotificationsAndHistory: Story = {
 			taskHistory: [
 				{
 					id: "task-1",
-					ts: Date.now() - 7200000, // 2 hours ago
+					ts: BASE_TIMESTAMP - 7200000, // 2 hours ago
 					task: "Create a responsive navigation component with TypeScript",
 					tokensIn: 1850,
 					tokensOut: 1200,
@@ -192,7 +192,7 @@ export const EmptyWithNotificationsAndHistory: Story = {
 				},
 				{
 					id: "task-2",
-					ts: Date.now() - 3600000, // 1 hour ago
+					ts: BASE_TIMESTAMP - 3600000, // 1 hour ago
 					task: "Debug authentication flow and fix login issues",
 					tokensIn: 950,
 					tokensOut: 720,

+ 25 - 26
pnpm-lock.yaml

@@ -111,6 +111,9 @@ importers:
       '@radix-ui/react-slot':
         specifier: ^1.1.2
         version: 1.2.3(@types/[email protected])([email protected])
+      '@roo-code/types':
+        specifier: workspace:^
+        version: link:../../packages/types
       '@tanstack/react-query':
         specifier: ^5.62.7
         version: 5.79.0([email protected])
@@ -12857,7 +12860,7 @@ snapshots:
 
   '@kwsites/[email protected]':
     dependencies:
-      debug: 4.4.1
+      debug: 4.4.1([email protected])
     transitivePeerDependencies:
       - supports-color
 
@@ -13213,7 +13216,7 @@ snapshots:
 
   '@puppeteer/[email protected]':
     dependencies:
-      debug: 4.4.1
+      debug: 4.4.1([email protected])
       extract-zip: 2.0.1
       progress: 2.0.3
       proxy-agent: 6.5.0
@@ -13226,7 +13229,7 @@ snapshots:
 
   '@puppeteer/[email protected]':
     dependencies:
-      debug: 4.4.1
+      debug: 4.4.1([email protected])
       extract-zip: 2.0.1
       progress: 2.0.3
       proxy-agent: 6.5.0
@@ -15464,7 +15467,7 @@ snapshots:
       sirv: 3.0.1
       tinyglobby: 0.2.14
       tinyrainbow: 2.0.0
-      vitest: 3.2.4(@types/[email protected])(@types/node@20.19.1)(@vitest/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])
+      vitest: 3.2.4(@types/[email protected])(@types/node@22.15.29)(@vitest/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])
 
   '@vitest/[email protected]':
     dependencies:
@@ -15985,7 +15988,7 @@ snapshots:
     dependencies:
       bytes: 3.1.2
       content-type: 1.0.5
-      debug: 4.4.1
+      debug: 4.4.1([email protected])
       http-errors: 2.0.0
       iconv-lite: 0.6.3
       on-finished: 2.4.1
@@ -16763,10 +16766,6 @@ snapshots:
     dependencies:
       ms: 2.1.3
 
-  [email protected]:
-    dependencies:
-      ms: 2.1.3
-
   [email protected]([email protected]):
     dependencies:
       ms: 2.1.3
@@ -17502,7 +17501,7 @@ snapshots:
       content-type: 1.0.5
       cookie: 0.7.2
       cookie-signature: 1.2.2
-      debug: 4.4.1
+      debug: 4.4.1([email protected])
       encodeurl: 2.0.0
       escape-html: 1.0.3
       etag: 1.8.1
@@ -17540,7 +17539,7 @@ snapshots:
 
   [email protected]:
     dependencies:
-      debug: 4.4.1
+      debug: 4.4.1([email protected])
       get-stream: 5.2.0
       yauzl: 2.10.0
     optionalDependencies:
@@ -17650,7 +17649,7 @@ snapshots:
 
   [email protected]:
     dependencies:
-      debug: 4.4.1
+      debug: 4.4.1([email protected])
       encodeurl: 2.0.0
       escape-html: 1.0.3
       on-finished: 2.4.1
@@ -17918,7 +17917,7 @@ snapshots:
     dependencies:
       basic-ftp: 5.0.5
       data-uri-to-buffer: 6.0.2
-      debug: 4.4.1
+      debug: 4.4.1([email protected])
     transitivePeerDependencies:
       - supports-color
 
@@ -18232,7 +18231,7 @@ snapshots:
   [email protected]:
     dependencies:
       agent-base: 7.1.3
-      debug: 4.4.1
+      debug: 4.4.1([email protected])
     transitivePeerDependencies:
       - supports-color
 
@@ -18246,7 +18245,7 @@ snapshots:
   [email protected]:
     dependencies:
       agent-base: 7.1.3
-      debug: 4.4.1
+      debug: 4.4.1([email protected])
     transitivePeerDependencies:
       - supports-color
 
@@ -20655,7 +20654,7 @@ snapshots:
     dependencies:
       '@tootallnate/quickjs-emscripten': 0.23.0
       agent-base: 7.1.3
-      debug: 4.4.1
+      debug: 4.4.1([email protected])
       get-uri: 6.0.4
       http-proxy-agent: 7.0.2
       https-proxy-agent: 7.0.6
@@ -21015,7 +21014,7 @@ snapshots:
   [email protected]:
     dependencies:
       agent-base: 7.1.3
-      debug: 4.4.1
+      debug: 4.4.1([email protected])
       http-proxy-agent: 7.0.2
       https-proxy-agent: 7.0.6
       lru-cache: 7.18.3
@@ -21060,7 +21059,7 @@ snapshots:
     dependencies:
       '@puppeteer/browsers': 2.6.1
       chromium-bidi: 0.11.0([email protected])
-      debug: 4.4.1
+      debug: 4.4.1([email protected])
       devtools-protocol: 0.0.1367902
       typed-query-selector: 2.12.0
       ws: 8.18.2
@@ -21074,7 +21073,7 @@ snapshots:
     dependencies:
       '@puppeteer/browsers': 2.10.5
       chromium-bidi: 5.1.0([email protected])
-      debug: 4.4.1
+      debug: 4.4.1([email protected])
       devtools-protocol: 0.0.1452169
       typed-query-selector: 2.12.0
       ws: 8.18.2
@@ -21605,7 +21604,7 @@ snapshots:
 
   [email protected]:
     dependencies:
-      debug: 4.4.1
+      debug: 4.4.1([email protected])
       depd: 2.0.0
       is-promise: 4.0.0
       parseurl: 1.3.3
@@ -21692,7 +21691,7 @@ snapshots:
 
   [email protected]:
     dependencies:
-      debug: 4.4.1
+      debug: 4.4.1([email protected])
       encodeurl: 2.0.0
       escape-html: 1.0.3
       etag: 1.8.1
@@ -21861,7 +21860,7 @@ snapshots:
     dependencies:
       '@kwsites/file-exists': 1.1.1
       '@kwsites/promise-deferred': 1.1.1
-      debug: 4.4.1
+      debug: 4.4.1([email protected])
     transitivePeerDependencies:
       - supports-color
 
@@ -21901,7 +21900,7 @@ snapshots:
   [email protected]:
     dependencies:
       agent-base: 7.1.3
-      debug: 4.4.1
+      debug: 4.4.1([email protected])
       socks: 2.8.4
     transitivePeerDependencies:
       - supports-color
@@ -22508,7 +22507,7 @@ snapshots:
       cac: 6.7.14
       chokidar: 4.0.3
       consola: 3.4.2
-      debug: 4.4.1
+      debug: 4.4.1([email protected])
       esbuild: 0.25.5
       fix-dts-default-cjs-exports: 1.0.1
       joycon: 3.1.1
@@ -22931,7 +22930,7 @@ snapshots:
   [email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]):
     dependencies:
       cac: 6.7.14
-      debug: 4.4.1
+      debug: 4.4.1([email protected])
       es-module-lexer: 1.7.0
       pathe: 2.0.3
       vite: 6.3.5(@types/[email protected])([email protected])([email protected])([email protected])([email protected])
@@ -23013,7 +23012,7 @@ snapshots:
       '@vitest/spy': 3.2.4
       '@vitest/utils': 3.2.4
       chai: 5.2.0
-      debug: 4.4.1
+      debug: 4.4.1([email protected])
       expect-type: 1.2.1
       magic-string: 0.30.17
       pathe: 2.0.3

+ 2 - 2
webview-ui/src/components/kilocode/KilocodeNotifications.tsx

@@ -52,8 +52,8 @@ export const KilocodeNotifications: React.FC = () => {
 			url: action.actionURL,
 		})
 		telemetryClient.capture(TelemetryEventName.NOTIFICATION_CLICKED, {
-			text: action.actionText,
-			url: action.actionURL,
+			actionText: action.actionText,
+			actionURL: action.actionURL,
 		})
 	}