mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
Moved theme to slashCommand
This commit is contained in:
@@ -35,16 +35,6 @@ interface AppProps {
|
||||
export const App = ({ config, cliVersion }: AppProps) => {
|
||||
const [history, setHistory] = useState<HistoryItem[]>([]);
|
||||
const [startupWarnings, setStartupWarnings] = useState<string[]>([]);
|
||||
const {
|
||||
streamingState,
|
||||
submitQuery,
|
||||
initError,
|
||||
debugMessage,
|
||||
slashCommands,
|
||||
} = useGeminiStream(setHistory, config);
|
||||
const { elapsedTime, currentLoadingPhrase } =
|
||||
useLoadingIndicator(streamingState);
|
||||
|
||||
const {
|
||||
isThemeDialogOpen,
|
||||
openThemeDialog,
|
||||
@@ -52,18 +42,26 @@ export const App = ({ config, cliVersion }: AppProps) => {
|
||||
handleThemeHighlight,
|
||||
} = useThemeCommand();
|
||||
|
||||
const {
|
||||
streamingState,
|
||||
submitQuery,
|
||||
initError,
|
||||
debugMessage,
|
||||
slashCommands,
|
||||
} = useGeminiStream(setHistory, config, openThemeDialog);
|
||||
const { elapsedTime, currentLoadingPhrase } =
|
||||
useLoadingIndicator(streamingState);
|
||||
|
||||
useStartupWarnings(setStartupWarnings);
|
||||
|
||||
const handleFinalSubmit = useCallback(
|
||||
(submittedValue: string) => {
|
||||
const trimmedValue = submittedValue.trim();
|
||||
if (trimmedValue === '/theme') {
|
||||
openThemeDialog();
|
||||
} else if (trimmedValue.length > 0) {
|
||||
if (trimmedValue.length > 0) {
|
||||
submitQuery(submittedValue);
|
||||
}
|
||||
},
|
||||
[openThemeDialog, submitQuery],
|
||||
[submitQuery],
|
||||
);
|
||||
|
||||
const userMessages = useMemo(
|
||||
|
||||
Reference in New Issue
Block a user