fix: better file/content return

This commit is contained in:
Adam
2025-09-04 12:39:34 -05:00
parent d440ba32ab
commit f171250033
4 changed files with 61 additions and 18 deletions

View File

@@ -1117,10 +1117,30 @@ export type Symbol = {
export type FileNode = {
name: string
path: string
absolute: string
type: "file" | "directory"
ignored: boolean
}
export type FileContent = {
content: string
diff?: string
patch?: {
oldFileName: string
newFileName: string
oldHeader?: string
newHeader?: string
hunks: Array<{
oldStart: number
oldLines: number
newStart: number
newLines: number
lines: Array<string>
}>
index?: string
}
}
export type File = {
path: string
added: number
@@ -1893,10 +1913,7 @@ export type FileReadResponses = {
/**
* File content
*/
200: {
type: "raw" | "patch"
content: string
}
200: FileContent
}
export type FileReadResponse = FileReadResponses[keyof FileReadResponses]