mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 12:21:13 -05:00
Add a few more read-only operations (#25)
This commit is contained in:
@@ -125,6 +125,31 @@ describe('ChatView', () => {
|
||||
})
|
||||
})
|
||||
|
||||
it('should auto-approve all file listing tool types when alwaysAllowReadOnly is true', () => {
|
||||
const fileListingTools = [
|
||||
'readFile', 'listFiles', 'listFilesTopLevel',
|
||||
'listFilesRecursive', 'listCodeDefinitionNames', 'searchFiles'
|
||||
]
|
||||
|
||||
fileListingTools.forEach(tool => {
|
||||
jest.clearAllMocks()
|
||||
mockState.clineMessages = [
|
||||
{
|
||||
type: 'ask',
|
||||
ask: 'tool',
|
||||
text: JSON.stringify({ tool }),
|
||||
ts: Date.now(),
|
||||
}
|
||||
]
|
||||
renderChatView()
|
||||
|
||||
expect(vscode.postMessage).toHaveBeenCalledWith({
|
||||
type: 'askResponse',
|
||||
askResponse: 'yesButtonClicked'
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
it('should auto-approve write tool actions when alwaysAllowWrite is true', () => {
|
||||
mockState.clineMessages = [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user