mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 08:47:44 +00:00
Update contextFileName to support an optional list of strings (#1001)
This commit is contained in:
@@ -45,7 +45,7 @@ import process from 'node:process';
|
||||
import {
|
||||
getErrorMessage,
|
||||
type Config,
|
||||
getCurrentGeminiMdFilename,
|
||||
getAllGeminiMdFilenames,
|
||||
ApprovalMode,
|
||||
isEditorAvailable,
|
||||
EditorType,
|
||||
@@ -373,6 +373,14 @@ const App = ({ config, settings, startupWarnings = [] }: AppProps) => {
|
||||
|
||||
const branchName = useGitBranchName(config.getTargetDir());
|
||||
|
||||
const contextFileNames = useMemo(() => {
|
||||
const fromSettings = settings.merged.contextFileName;
|
||||
if (fromSettings) {
|
||||
return Array.isArray(fromSettings) ? fromSettings : [fromSettings];
|
||||
}
|
||||
return getAllGeminiMdFilenames();
|
||||
}, [settings.merged.contextFileName]);
|
||||
|
||||
if (quittingMessages) {
|
||||
return (
|
||||
<Box flexDirection="column" marginBottom={1}>
|
||||
@@ -509,10 +517,7 @@ const App = ({ config, settings, startupWarnings = [] }: AppProps) => {
|
||||
) : (
|
||||
<ContextSummaryDisplay
|
||||
geminiMdFileCount={geminiMdFileCount}
|
||||
contextFileName={
|
||||
settings.merged.contextFileName ||
|
||||
getCurrentGeminiMdFilename()
|
||||
}
|
||||
contextFileNames={contextFileNames}
|
||||
mcpServers={config.getMcpServers()}
|
||||
showToolDescriptions={showToolDescriptions}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user