mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
Display open IDE file in context section above input box rather than in the footer (#4470)
This commit is contained in:
@@ -58,6 +58,8 @@ import {
|
||||
FlashFallbackEvent,
|
||||
logFlashFallback,
|
||||
AuthType,
|
||||
type ActiveFile,
|
||||
ideContext,
|
||||
} from '@google/gemini-cli-core';
|
||||
import { validateAuthMethod } from '../config/auth.js';
|
||||
import { useLogger } from './hooks/useLogger.js';
|
||||
@@ -158,6 +160,14 @@ const App = ({ config, settings, startupWarnings = [], version }: AppProps) => {
|
||||
const [modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError] =
|
||||
useState<boolean>(false);
|
||||
const [userTier, setUserTier] = useState<UserTierId | undefined>(undefined);
|
||||
const [activeFile, setActiveFile] = useState<ActiveFile | undefined>();
|
||||
|
||||
useEffect(() => {
|
||||
const unsubscribe = ideContext.subscribeToActiveFile(setActiveFile);
|
||||
// Set the initial value
|
||||
setActiveFile(ideContext.getActiveFileContext());
|
||||
return unsubscribe;
|
||||
}, []);
|
||||
|
||||
const openPrivacyNotice = useCallback(() => {
|
||||
setShowPrivacyNotice(true);
|
||||
@@ -883,6 +893,7 @@ const App = ({ config, settings, startupWarnings = [], version }: AppProps) => {
|
||||
</Text>
|
||||
) : (
|
||||
<ContextSummaryDisplay
|
||||
activeFile={activeFile}
|
||||
geminiMdFileCount={geminiMdFileCount}
|
||||
contextFileNames={contextFileNames}
|
||||
mcpServers={config.getMcpServers()}
|
||||
|
||||
Reference in New Issue
Block a user