Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/core/costrict/code-review/codeReviewService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,13 @@ export class CodeReviewService {
isCompleted: true,
})
})
task.on(RooCodeEventName.TaskAborted, () => {
if (completionHandled) return
this.updateTaskState({
error: new Error(t("common:review.tip.task_cancelled")),
isCompleted: true,
})
})

// 把 postMessageToWebview 移到事件注册之后
provider.postMessageToWebview({
Expand Down Expand Up @@ -420,8 +427,6 @@ export class CodeReviewService {
// Reset state
this.currentTask = null
this.currentActiveIssueId = null

// Note: No longer sending taskAborted message as per requirements
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/i18n/costrict-i18n/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@
"service_unavailable": "Service unavailable, please try again later.",
"api_provider_not_support": "The current API provider does not support the Code Review function, please switch to the CoStrict API provider.",
"task_timeout": "Task execution timed out, has been automatically canceled",
"task_cancelled": "Task has been cancelled, please create a new task for Code Review",
"get_review_result_failed": "Unable to obtain review results, please try again",
"no_changed_files": "No changed files, please ensure that the current workspace is a git repository and has changed files.",
"new_commit_notification": "You committed: {{commitMessage}}, whether to perform review?"
Expand Down
1 change: 1 addition & 0 deletions src/i18n/costrict-i18n/locales/zh-CN/common.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/i18n/costrict-i18n/locales/zh-TW/common.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.