Skip to content

Share the command file-write parser contract across terminal auto-approval #328903

Description

@anthonykim1

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.

Metadata

Metadata

Assignees

Labels

debtCode quality issuesterminal-auto-approveRelated to the terminal's auto approve logic

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions