You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Enhance read_file tool to support multiple files via setting
Implements the ability for the `read_file` tool to accept a JSON array
string of file paths in its `path` parameter, allowing the AI to request
multiple files in a single call.
Key changes:
- Added `maxConcurrentFileReads` setting (default: 1) to control the
maximum number of files read per request.
- Updated setting schema, types, UI (slider in Context Management),
state management, and persistence logic for the new setting.
- Modified `readFileTool.ts` to parse the `path` parameter (handling
both single strings and JSON arrays), enforce the
`maxConcurrentFileReads` limit, and aggregate results/errors.
- Updated the `read_file` tool prompt description to inform the AI
about the new capability and usage.
- Includes fixes for UI slider display/persistence and backend state handling.
- Updated relevant unit tests.
return`Incomplete or malformed file path array: ${params?.value}. It looks like a JSON array but is missing the closing bracket or is otherwise invalid.`
185
+
}
186
+
returnkey
187
+
});
188
+
189
+
// Apply the mock for i18n specifically for this suite
`<tool_error tool_name="read_file">Incomplete or malformed file path array: ${incompleteJsonPath}. It looks like a JSON array but is missing the closing bracket or is otherwise invalid.</tool_error>`,
238
+
)
239
+
})
240
+
241
+
// Add more tests for other parsing scenarios (valid JSON, single path, invalid format, etc.) if needed
0 commit comments