mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-05 15:31:27 +00:00
Cleanup: Remove low value StreamingContextType interface. (#585)
This commit is contained in:
parent
05a49702d8
commit
00805cb2cd
6 changed files with 15 additions and 41 deletions
|
|
@ -7,15 +7,11 @@
|
|||
import React, { createContext } from 'react';
|
||||
import { StreamingState } from '../types.js';
|
||||
|
||||
export interface StreamingContextType {
|
||||
streamingState: StreamingState;
|
||||
}
|
||||
|
||||
export const StreamingContext = createContext<StreamingContextType | undefined>(
|
||||
export const StreamingContext = createContext<StreamingState | undefined>(
|
||||
undefined,
|
||||
);
|
||||
|
||||
export const useStreamingContext = (): StreamingContextType => {
|
||||
export const useStreamingContext = (): StreamingState => {
|
||||
const context = React.useContext(StreamingContext);
|
||||
if (context === undefined) {
|
||||
throw new Error(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue