starchild-widget
Version:
Starchild Widget
158 lines • 4.62 kB
TypeScript
import { OrderSide, OrderType, OriginSymbolOrderRulesInfo, SymbolMarketInfo } from '../api';
import { Size } from '../common';
export declare enum ROLE_TYPE {
USER = "USER",
ASSISTANT = "ASSISTANT"
}
export interface ThoughtContentDataType {
id?: string;
tool_name: string;
tool_type: string;
tool_description: string;
}
export interface SourceListDetailsDataType {
id: string;
title: string;
status: 'success' | 'error';
description: string;
}
export declare enum RECOMMENDATION_TYPE {
SUBSCRIBE = "subscribe",
CREATE_ALERT = "create_alert",
CREATE_BACKTEST = "create_backtest"
}
export interface RecommandContentDataType {
message: string;
task_id: string;
recommendation_type: RECOMMENDATION_TYPE;
confidence: number;
recommendation_id: number;
source: string;
ts: string;
}
export interface TempAiContentDataType {
id: string;
role: ROLE_TYPE;
content: string;
timestamp: number;
thoughtContentList: ThoughtContentDataType[];
sourceListDetails: SourceListDetailsDataType[];
feedback: {
feedback_type: string;
feedback_id: string;
created_at: string;
extra_data: {
dislike_reason: string;
};
} | null;
agentId?: string;
threadId?: string;
agentRecommendationList: RecommandContentDataType[];
orderParams?: {
symbol_info: OriginSymbolOrderRulesInfo;
symbol_market_info: SymbolMarketInfo;
display_result: string;
order_parameters: {
side: OrderSide;
symbol: string;
order_type: OrderType;
reduce_only: boolean;
order_amount: number;
client_order_id: string;
};
validation_warnings: any[];
status?: string;
};
klineCharts?: {
url: string;
timestamp: string;
session_id: string;
};
}
export interface ThreadData {
threadId: string;
createdAt: number;
title: string;
}
export declare enum LOADING_STATUS {
LOADING = 0,
SUCCESS = 1
}
export interface AnalyzeContentDataType {
content: string;
loadingStatus: LOADING_STATUS;
}
export interface ChatRecommendationDataType {
id: number;
full_text: string;
display_text: string;
language: string;
}
export declare enum STREAM_DATA_TYPE {
FINAL_ANSWER = "final_answer",
TEMP = "temp",
END_THINKING = "end_thinking",
ERROR = "error",
SOURCE_LIST_DETAILS = "source_list_details",
ORDER_PARAMS = "order_params"
}
export interface AiSteamDataType {
id: string;
type: STREAM_DATA_TYPE;
content: string;
threadId: string;
}
export interface UserSettingDataType {
searchbarShortcut: string;
voiceShortcut: string;
}
/**
* Chat component state interface
* Note: position management has been migrated to positioncache store
*/
export interface ChatState {
readonly visible: boolean;
readonly disabled: boolean;
readonly aiResponseContentList: TempAiContentDataType[];
readonly tempAiContentData: TempAiContentDataType;
readonly isFocus: boolean;
readonly inputValue: string;
readonly isLoadingData: boolean;
readonly isRenderingData: boolean;
readonly isChatModalOpen: boolean;
readonly threadsList: ThreadData[];
readonly currentLoadingThreadId: string;
readonly currentRenderingId: string;
readonly isAnalyzeContent: boolean;
readonly analyzeContentList: AnalyzeContentDataType[];
readonly currentAiContentDeepThinkData: TempAiContentDataType;
readonly chatRecommendationList: ChatRecommendationDataType[];
readonly isShowThreadList: boolean;
readonly isShowDeepThinkSources: boolean;
readonly isShowDeepThink: boolean;
readonly isRecording: boolean;
readonly isHandleRecord: boolean;
readonly realtimeText: string;
readonly userSetting: UserSettingDataType;
readonly shouldTriggerVoiceRecording: boolean;
}
export declare enum ACTION_TYPE {
/** 用户点击了推荐链接 */
CLICKED = "clicked",
/** 用户订阅了推荐的代理 */
SUBSCRIBED = "subscribed",
/** 用户创建了价格提醒 */
CREATED_ALERT = "created_alert",
/** 用户创建了回测任务 */
CREATED_BACKTEST = "created_backtest",
/** 用户忽略/关闭了推荐 */
DISMISSED = "dismissed",
/** 用户分享了推荐 */
SHARED = "shared"
}
export interface ChatcacheState {
readonly currentAiThreadId: string;
readonly searchSize: Size | null;
readonly isShowVoiceTooltip: boolean;
}
//# sourceMappingURL=chat.d.ts.map