After the change last year, the read_file reads only 2000 characters without any way how to change this limit:
|
const MAX_LINE_LENGTH = 2000; |
While I understand the reasoning behind this change, there are valid scenarios where larger lines are needed.
These scenarios include (but are not limited) to output of important MCP tools such as Azure DevOps MCP where larger details, user stories or implementation requirements often have more than 2000 characters. The MCP returns JSON where the content of every fields is one line and truncating details causing wrong context to be passed to copilot.
There are workarounds, but they are not easy to implement (e.g. adding postprocessing task to MCP to split the response from string to array of strings to split long text to multiple lines).
I think this is a bug as the idea behind this limitation was unstructured text (long tokens) or binary files, but structured text returned from MCPs was overlooked.
After the change last year, the read_file reads only 2000 characters without any way how to change this limit:
vscode/extensions/copilot/src/extension/tools/node/readFileTool.tsx
Line 77 in 26129ae
While I understand the reasoning behind this change, there are valid scenarios where larger lines are needed.
These scenarios include (but are not limited) to output of important MCP tools such as Azure DevOps MCP where larger details, user stories or implementation requirements often have more than 2000 characters. The MCP returns JSON where the content of every fields is one line and truncating details causing wrong context to be passed to copilot.
There are workarounds, but they are not easy to implement (e.g. adding postprocessing task to MCP to split the response from string to array of strings to split long text to multiple lines).
I think this is a bug as the idea behind this limitation was unstructured text (long tokens) or binary files, but structured text returned from MCPs was overlooked.