mirror of https://github.com/kortix-ai/suna.git
AI: How can we stream the edit_file tool when it generating like create_file ? Also the edit_file tool show this
"""Invalid File Edit Could not extract the file changes from the tool result.""" Check the state of code base and make to sure implement fully
This commit is contained in:
parent
1fbac3bc15
commit
86aaa9e5ca
|
@ -142,7 +142,7 @@ export function FileEditToolView({
|
|||
const lineDiff = originalContent && updatedContent ? generateLineDiff(originalContent, updatedContent) : [];
|
||||
const stats: DiffStats = calculateDiffStats(lineDiff);
|
||||
|
||||
const shouldShowError = !isStreaming && (!actualIsSuccess || (actualIsSuccess && (!originalContent || !updatedContent)));
|
||||
const shouldShowError = !isStreaming && (!actualIsSuccess || (actualIsSuccess && (originalContent === null || updatedContent === null)));
|
||||
|
||||
return (
|
||||
<Card className="gap-0 flex border shadow-none border-t border-b-0 border-x-0 p-0 rounded-none flex-col h-full overflow-hidden bg-card">
|
||||
|
|
|
@ -265,8 +265,8 @@ export const extractFileEditData = (
|
|||
const success = parsed.tool_execution.result?.success;
|
||||
return {
|
||||
filePath: args.target_file || output?.file_path || null,
|
||||
originalContent: output?.original_content || null,
|
||||
updatedContent: output?.updated_content || null,
|
||||
originalContent: output?.original_content ?? null,
|
||||
updatedContent: output?.updated_content ?? null,
|
||||
success: success,
|
||||
timestamp: parsed.tool_execution.execution_details?.timestamp,
|
||||
errorMessage: success === false ? (output?.message || (typeof output === 'string' ? output : JSON.stringify(output))) : undefined,
|
||||
|
|
Loading…
Reference in New Issue