fix: build.gradle 使用 npm 而非 npm.cmd#31
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
User description
Summary
Changes
npm.cmd→npmnpm.cmd→npmTest plan
PR Type
Enhancement
Description
Add quota error detection in
ChatService.ktfor insufficient quota, billing, and payment-related errorsRedesign
ErrorBannercomponent with custom styled UI supporting config, quota, network, and runtime error typesAdd retry functionality that preserves user message and context for failed requests
Introduce new CSS styling for error banner with distinct color schemes per error type
Diagram Walkthrough
File Walkthrough
ChatService.kt
Add quota error detection in stream error classificationsrc/main/kotlin/com/github/codeplangui/ChatService.kt
classifyStreamError()forhandling insufficient quota, billing, and payment-related errors
"credit", "payment", and Chinese variations
BridgeErrorPayloadwith type "quota" and action "openSettings"App.tsx
Add error action handling and retry logicwebview/src/App.tsx
lastUserMessageRefto store user message for retry functionalityhandleSendto properly set error type based on connection statehandleErrorActioncallback to handle openSettings and retryactions
onActionprop toErrorBannercomponentErrorBanner.tsx
Redesign ErrorBanner with custom styling and actionswebview/src/components/ErrorBanner.tsx
Alert
error types
onActionprop for handling buttonclicks
bridge.d.ts
Add quota error type to BridgeError interfacewebview/src/types/bridge.d.ts
BridgeErrorinterfaceErrorBanner.css
Add custom CSS styles for error banner componentwebview/src/components/ErrorBanner.css
for network, red for runtime
action buttons