Skip to content

Commit 2d7174b

Browse files
daniel-lxsmrubens
authored andcommitted
refactor: move QueuedMessage interface to packages/types
- Move QueuedMessage interface from local types.ts to packages/types/src/message.ts - Update imports in ChatView.tsx and QueuedMessages.tsx to use @roo-code/types - Remove local types.ts file to follow codebase conventions
1 parent 1e4637c commit 2d7174b

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

packages/types/src/message.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,3 +174,19 @@ export const tokenUsageSchema = z.object({
174174
})
175175

176176
export type TokenUsage = z.infer<typeof tokenUsageSchema>
177+
178+
/**
179+
* QueuedMessage
180+
*/
181+
182+
/**
183+
* Represents a message that is queued to be sent when sending is enabled
184+
*/
185+
export interface QueuedMessage {
186+
/** Unique identifier for the queued message */
187+
id: string
188+
/** The text content of the message */
189+
text: string
190+
/** Array of image data URLs attached to the message */
191+
images: string[]
192+
}

webview-ui/src/components/chat/ChatView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ import ProfileViolationWarning from "./ProfileViolationWarning"
5656
import { CheckpointWarning } from "./CheckpointWarning"
5757
import QueuedMessages from "./QueuedMessages"
5858
import { getLatestTodo } from "@roo/todo"
59-
import { QueuedMessage } from "./types"
59+
import { QueuedMessage } from "@roo-code/types"
6060

6161
export interface ChatViewProps {
6262
isHidden: boolean

webview-ui/src/components/chat/QueuedMessages.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from "react"
22
import { VSCodeButton } from "@vscode/webview-ui-toolkit/react"
33
import { useTranslation } from "react-i18next"
44
import Thumbnails from "../common/Thumbnails"
5-
import { QueuedMessage } from "./types"
5+
import { QueuedMessage } from "@roo-code/types"
66

77
interface QueuedMessagesProps {
88
queue: QueuedMessage[]

0 commit comments

Comments
 (0)