Context
PR #328882 moves SedFileWriteParser into vs/platform/terminal/common/autoApprove so workbench and Agent Host can reuse it.
The parser structurally satisfies workbench's ICommandFileWriteParser, but cannot explicitly declare implements ICommandFileWriteParser because that interface still lives under the workbench contribution layer.
Debt
Move the command-specific file-write parser contract to the shared terminal auto-approval layer, for example:
src/vs/platform/terminal/common/autoApprove/commandFileWriteParser.ts
Then:
- Have
SedFileWriteParser explicitly implement the shared interface.
- Update workbench's parser registry to import the shared interface.
- Use the shared contract for future command-specific write parsers (
tee, dd, perl -i, etc.).
- Keep destination approval policy in workbench and Agent Host; only the parser contract belongs in the shared layer.
This is an organizational/type-contract cleanup and should not change runtime behavior.
Context
PR #328882 moves
SedFileWriteParserintovs/platform/terminal/common/autoApproveso workbench and Agent Host can reuse it.The parser structurally satisfies workbench's
ICommandFileWriteParser, but cannot explicitly declareimplements ICommandFileWriteParserbecause that interface still lives under the workbench contribution layer.Debt
Move the command-specific file-write parser contract to the shared terminal auto-approval layer, for example:
Then:
SedFileWriteParserexplicitly implement the shared interface.tee,dd,perl -i, etc.).This is an organizational/type-contract cleanup and should not change runtime behavior.