mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-17 22:05:50 +00:00
@@ -25,7 +25,8 @@ function isLargeOutputs(
|
||||
let size = 0
|
||||
for (const o of outputs) {
|
||||
if (!o) continue
|
||||
size += (o.text?.length ?? 0) + (o.image?.image_data.length ?? 0)
|
||||
const imageLen = 'image' in o && o.image ? o.image.image_data.length : 0
|
||||
size += (o.text?.length ?? 0) + imageLen
|
||||
if (size > LARGE_OUTPUT_THRESHOLD) return true
|
||||
}
|
||||
return false
|
||||
@@ -139,7 +140,7 @@ function cellOutputToToolResult(output: NotebookCellSourceOutput) {
|
||||
type: 'text',
|
||||
})
|
||||
}
|
||||
if (output.image) {
|
||||
if ('image' in output && output.image) {
|
||||
outputs.push({
|
||||
type: 'image',
|
||||
source: {
|
||||
|
||||
Reference in New Issue
Block a user