mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 08:47:44 +00:00
Cleanup: Remove low value StreamingContextType interface. (#585)
This commit is contained in:
@@ -41,10 +41,7 @@ import { useHistory } from './hooks/useHistoryManager.js';
|
||||
import process from 'node:process';
|
||||
import { getErrorMessage, type Config } from '@gemini-code/server';
|
||||
import { useLogger } from './hooks/useLogger.js';
|
||||
import {
|
||||
StreamingContext,
|
||||
StreamingContextType,
|
||||
} from './contexts/StreamingContext.js';
|
||||
import { StreamingContext } from './contexts/StreamingContext.js';
|
||||
|
||||
interface AppProps {
|
||||
config: Config;
|
||||
@@ -182,11 +179,6 @@ export const App = ({
|
||||
useLoadingIndicator(streamingState);
|
||||
const showAutoAcceptIndicator = useAutoAcceptIndicator({ config });
|
||||
|
||||
const streamingContextValue: StreamingContextType = useMemo(
|
||||
() => ({ streamingState }),
|
||||
[streamingState],
|
||||
);
|
||||
|
||||
const handleFinalSubmit = useCallback(
|
||||
(submittedValue: string) => {
|
||||
const trimmedValue = submittedValue.trim();
|
||||
@@ -278,7 +270,7 @@ export const App = ({
|
||||
}, [consoleMessages, config]);
|
||||
|
||||
return (
|
||||
<StreamingContext.Provider value={streamingContextValue}>
|
||||
<StreamingContext.Provider value={streamingState}>
|
||||
<Box flexDirection="column" marginBottom={1} width="90%">
|
||||
{/*
|
||||
* The Static component is an Ink intrinsic in which there can only be 1 per application.
|
||||
|
||||
Reference in New Issue
Block a user