mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-29 12:11:09 +00:00
Update contextFileName to support an optional list of strings (#1001)
This commit is contained in:
parent
34e0d9c0b6
commit
2a1ad1f5d9
10 changed files with 176 additions and 117 deletions
|
|
@ -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}
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue