mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-04 06:30:53 +00:00
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:
parent
935e819543
commit
c2ba096351
8 changed files with 207 additions and 147 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue