(toolResult: ToolResult)
| 764 | } |
| 765 | |
| 766 | function toToolCallContent(toolResult: ToolResult): acp.ToolCallContent | null { |
| 767 | if (toolResult.returnDisplay) { |
| 768 | if (typeof toolResult.returnDisplay === 'string') { |
| 769 | return { |
| 770 | type: 'content', |
| 771 | content: { type: 'text', text: toolResult.returnDisplay }, |
| 772 | }; |
| 773 | } else { |
| 774 | return { |
| 775 | type: 'diff', |
| 776 | path: toolResult.returnDisplay.fileName, |
| 777 | oldText: toolResult.returnDisplay.originalContent, |
| 778 | newText: toolResult.returnDisplay.newContent, |
| 779 | }; |
| 780 | } |
| 781 | } else { |
| 782 | return null; |
| 783 | } |
| 784 | } |
| 785 | |
| 786 | const basicPermissionOptions = [ |
| 787 | { |
no outgoing calls
no test coverage detected