mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-08 03:07:53 +00:00
Refactor assistant message
This commit is contained in:
parent
05eab1f22f
commit
7ee0a58f9b
3 changed files with 4 additions and 3 deletions
|
|
@ -36,8 +36,7 @@ import { calculateApiCost } from "../utils/cost"
|
|||
import { fileExistsAtPath } from "../utils/fs"
|
||||
import { arePathsEqual, getReadablePath } from "../utils/path"
|
||||
import { parseMentions } from "./mentions"
|
||||
import { AssistantMessageContent, ToolParamName, ToolUseName } from "./assistant-message"
|
||||
import { parseAssistantMessage } from "./assistant-message/parse-assistant-message"
|
||||
import { AssistantMessageContent, parseAssistantMessage, ToolParamName, ToolUseName } from "./assistant-message"
|
||||
import { formatResponse } from "./prompts/responses"
|
||||
import { addCustomInstructions, SYSTEM_PROMPT } from "./prompts/system"
|
||||
import { truncateHalfConversation } from "./sliding-window"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
export type AssistantMessageContent = TextContent | ToolUse
|
||||
|
||||
export { parseAssistantMessage } from "./parse-assistant-message"
|
||||
|
||||
export interface TextContent {
|
||||
type: "text"
|
||||
content: string
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import {
|
|||
toolParamNames,
|
||||
toolUseNames,
|
||||
ToolUseName,
|
||||
} from "./AssistantMessage"
|
||||
} from "."
|
||||
|
||||
export function parseAssistantMessage(assistantMessage: string) {
|
||||
let contentBlocks: AssistantMessageContent[] = []
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue