Skip to content

feat - LSP data layer + confirmationService skeleton (Auto-approve Part 1 )#132

Open
xinyi-gong wants to merge 3 commits intofeature/auto-approvefrom
tori/auto-approve-task-1
Open

feat - LSP data layer + confirmationService skeleton (Auto-approve Part 1 )#132
xinyi-gong wants to merge 3 commits intofeature/auto-approvefrom
tori/auto-approve-task-1

Conversation

@xinyi-gong
Copy link
Copy Markdown
Member

No description provided.

@xinyi-gong xinyi-gong force-pushed the tori/auto-approve-task-1 branch from 43ee7e3 to 320cec3 Compare April 29, 2026 08:33
@xinyi-gong xinyi-gong marked this pull request as ready for review April 29, 2026 08:34
* request should be auto-approved or shown to the user. Currently a no-op skeleton that
* always requires confirmation; concrete logic will be added in subsequent sub-tasks.
*/
public class ConfirmationService {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe move this class to core bundle?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ConfirmationService depends on IPreferenceStore and will hold references to concrete handler implementations (TerminalConfirmationHandler, FileOperationConfirmationHandler, etc.) which live in the ui bundle.

* @param params the confirmation request parameters from CLS
* @return the confirmation result (currently always {@link ConfirmationResult#NEEDS_CONFIRMATION})
*/
public ConfirmationResult evaluate(InvokeClientToolConfirmationParams params) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How will this class looks like ultimately? (I'm trying to understand why it is a standalone class, not just a utility)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the central orchestrator for auto-approve. It holds a ToolCategory enum (matching CLS's ToolFunctionalType), a map of category and handler, reads the toolType from CLS confirmation requests to classify and dispatch. It also handles cross-cutting checks like YOLO mode before dispatching. It's a stateful service because handlers will eventually hold session-level memory for "Allow for Session" from the confirmation dialog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants