mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-05 07:10:55 +00:00
refactor: merge coder-model and qwen3.5-plus, remove vision model switching
- Merge coder-model and qwen3.5-plus into a single coder-model with vision capability - Remove vlmSwitchMode CLI argument and experimental.vlmSwitchMode setting - Remove useVisionAutoSwitch hook and inline image format checking into useGeminiStream - Remove ModelSwitchDialog and related vision switch UI components - Update all related tests to reflect the simplified model structure - Set DEFAULT_QWEN_MODEL to coder-model Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
parent
a55e96a6a3
commit
ae6716c651
29 changed files with 149 additions and 1693 deletions
|
|
@ -100,8 +100,6 @@ import { t } from '../i18n/index.js';
|
|||
import { useWelcomeBack } from './hooks/useWelcomeBack.js';
|
||||
import { useDialogClose } from './hooks/useDialogClose.js';
|
||||
import { useInitializationAuthError } from './hooks/useInitializationAuthError.js';
|
||||
import { type VisionSwitchOutcome } from './components/ModelSwitchDialog.js';
|
||||
import { processVisionSwitchOutcome } from './hooks/useVisionAutoSwitch.js';
|
||||
import { useSubagentCreateDialog } from './hooks/useSubagentCreateDialog.js';
|
||||
import { useAgentsManagerDialog } from './hooks/useAgentsManagerDialog.js';
|
||||
import { useAttentionNotifications } from './hooks/useAttentionNotifications.js';
|
||||
|
|
@ -496,18 +494,6 @@ export const AppContainer = (props: AppContainerProps) => {
|
|||
closeAgentsManagerDialog,
|
||||
} = useAgentsManagerDialog();
|
||||
|
||||
// Vision model auto-switch dialog state (must be before slashCommandActions)
|
||||
const [isVisionSwitchDialogOpen, setIsVisionSwitchDialogOpen] =
|
||||
useState(false);
|
||||
const [visionSwitchResolver, setVisionSwitchResolver] = useState<{
|
||||
resolve: (result: {
|
||||
modelOverride?: string;
|
||||
persistSessionModel?: string;
|
||||
showGuidance?: boolean;
|
||||
}) => void;
|
||||
reject: () => void;
|
||||
} | null>(null);
|
||||
|
||||
const slashCommandActions = useMemo(
|
||||
() => ({
|
||||
openAuthDialog,
|
||||
|
|
@ -571,32 +557,6 @@ export const AppContainer = (props: AppContainerProps) => {
|
|||
logger,
|
||||
);
|
||||
|
||||
// Vision switch handlers
|
||||
const handleVisionSwitchRequired = useCallback(
|
||||
async (_query: unknown) =>
|
||||
new Promise<{
|
||||
modelOverride?: string;
|
||||
persistSessionModel?: string;
|
||||
showGuidance?: boolean;
|
||||
}>((resolve, reject) => {
|
||||
setVisionSwitchResolver({ resolve, reject });
|
||||
setIsVisionSwitchDialogOpen(true);
|
||||
}),
|
||||
[],
|
||||
);
|
||||
|
||||
const handleVisionSwitchSelect = useCallback(
|
||||
(outcome: VisionSwitchOutcome) => {
|
||||
setIsVisionSwitchDialogOpen(false);
|
||||
if (visionSwitchResolver) {
|
||||
const result = processVisionSwitchOutcome(outcome);
|
||||
visionSwitchResolver.resolve(result);
|
||||
setVisionSwitchResolver(null);
|
||||
}
|
||||
},
|
||||
[visionSwitchResolver],
|
||||
);
|
||||
|
||||
// onDebugMessage should log to debug logfile, not update footer debugMessage
|
||||
const onDebugMessage = useCallback(
|
||||
(message: string) => {
|
||||
|
|
@ -687,11 +647,9 @@ export const AppContainer = (props: AppContainerProps) => {
|
|||
setModelSwitchedFromQuotaError,
|
||||
refreshStatic,
|
||||
() => cancelHandlerRef.current(),
|
||||
settings.merged.experimental?.visionModelPreview ?? false, // visionModelPreviewEnabled
|
||||
setEmbeddedShellFocused,
|
||||
terminalWidth,
|
||||
terminalHeight,
|
||||
handleVisionSwitchRequired, // onVisionSwitchRequired
|
||||
);
|
||||
|
||||
// Track whether suggestions are visible for Tab key handling
|
||||
|
|
@ -846,7 +804,6 @@ export const AppContainer = (props: AppContainerProps) => {
|
|||
!isThemeDialogOpen &&
|
||||
!isEditorDialogOpen &&
|
||||
!showWelcomeBackDialog &&
|
||||
!isVisionSwitchDialogOpen &&
|
||||
welcomeBackChoice !== 'restart' &&
|
||||
geminiClient?.isInitialized?.()
|
||||
) {
|
||||
|
|
@ -862,7 +819,6 @@ export const AppContainer = (props: AppContainerProps) => {
|
|||
isThemeDialogOpen,
|
||||
isEditorDialogOpen,
|
||||
showWelcomeBackDialog,
|
||||
isVisionSwitchDialogOpen,
|
||||
welcomeBackChoice,
|
||||
geminiClient,
|
||||
]);
|
||||
|
|
@ -1334,7 +1290,6 @@ export const AppContainer = (props: AppContainerProps) => {
|
|||
isThemeDialogOpen ||
|
||||
isSettingsDialogOpen ||
|
||||
isModelDialogOpen ||
|
||||
isVisionSwitchDialogOpen ||
|
||||
isPermissionsDialogOpen ||
|
||||
isAuthDialogOpen ||
|
||||
isAuthenticating ||
|
||||
|
|
@ -1446,8 +1401,6 @@ export const AppContainer = (props: AppContainerProps) => {
|
|||
extensionsUpdateState,
|
||||
activePtyId,
|
||||
embeddedShellFocused,
|
||||
// Vision switch dialog
|
||||
isVisionSwitchDialogOpen,
|
||||
// Welcome back dialog
|
||||
showWelcomeBackDialog,
|
||||
welcomeBackInfo,
|
||||
|
|
@ -1538,8 +1491,6 @@ export const AppContainer = (props: AppContainerProps) => {
|
|||
activePtyId,
|
||||
historyManager,
|
||||
embeddedShellFocused,
|
||||
// Vision switch dialog
|
||||
isVisionSwitchDialogOpen,
|
||||
// Welcome back dialog
|
||||
showWelcomeBackDialog,
|
||||
welcomeBackInfo,
|
||||
|
|
@ -1581,8 +1532,6 @@ export const AppContainer = (props: AppContainerProps) => {
|
|||
refreshStatic,
|
||||
handleFinalSubmit,
|
||||
handleClearScreen,
|
||||
// Vision switch dialog
|
||||
handleVisionSwitchSelect,
|
||||
// Welcome back dialog
|
||||
handleWelcomeBackSelection,
|
||||
handleWelcomeBackClose,
|
||||
|
|
@ -1626,7 +1575,6 @@ export const AppContainer = (props: AppContainerProps) => {
|
|||
refreshStatic,
|
||||
handleFinalSubmit,
|
||||
handleClearScreen,
|
||||
handleVisionSwitchSelect,
|
||||
handleWelcomeBackSelection,
|
||||
handleWelcomeBackClose,
|
||||
// Subagent dialogs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue