fix(webui): remove @qwen-code/qwen-code-core dependency (#2902)

Remove core dependency from webui by inlining followup controller logic.
This fixes nightly release CI failure where npm version couldn't resolve
the core peer dependency for prerelease versions.

- Move FollowupState type and INITIAL_FOLLOWUP_STATE to src/types/followup.ts
- Inline createFollowupController into src/hooks/useFollowupSuggestions.ts
- Remove separate @qwen-code/webui/followup subpath and vite config
- Export useFollowupSuggestions from main entry

Fixes #2900

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
tanzhenxin 2026-04-07 13:11:03 +08:00 committed by GitHub
parent 935e819543
commit c2ba096351
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 207 additions and 147 deletions

View file

@ -22,18 +22,7 @@ import { CompletionMenu } from './CompletionMenu.js';
import { ContextIndicator } from './ContextIndicator.js';
import type { CompletionItem } from '../../types/completion.js';
import type { ContextUsage } from './ContextIndicator.js';
/**
* Minimal follow-up state shape used by InputForm.
* Defined locally to avoid pulling @qwen-code/qwen-code-core into the
* root entry's type declarations. The full FollowupState lives in
* '@qwen-code/webui/followup'.
*/
interface InputFormFollowupState {
/** Current suggestion text */
suggestion: string | null;
/** Whether to show suggestion */
isVisible: boolean;
}
import type { FollowupState } from '../../types/followup.js';
/**
* Edit mode display information
@ -141,7 +130,7 @@ export interface InputFormProps {
/** Whether the current draft is eligible to submit */
canSubmit?: boolean;
/** Prompt suggestion state */
followupState?: InputFormFollowupState;
followupState?: FollowupState;
/** Callback to accept prompt suggestion */
onAcceptFollowup?: (method?: 'tab' | 'enter' | 'right') => void;
/** Callback to dismiss prompt suggestion */