add chat plugin and split query to parse and execute (#25)

* [feature](webapp) add drill down dimensions and metric period compare and modify layout

* [feature](webapp) add drill down dimensions and metric period compare and modify layout

* [feature](webapp) gitignore add supersonic-webapp

* [feature](webapp) gitignore add supersonic-webapp

* [feature](webapp) add chat plugin and split query to parse and execute

* [feature](webapp) add chat plugin and split query to parse and execute

* [feature](webapp) add chat plugin and split query to parse and execute

---------

Co-authored-by: williamhliu <williamhliu@tencent.com>
This commit is contained in:
williamhliu
2023-08-05 22:17:42 +08:00
committed by GitHub
parent c9baed6c4e
commit 6951eada9d
86 changed files with 3193 additions and 1595 deletions

View File

@@ -42,9 +42,18 @@ export const THEME_COLOR_LIST = [
export const PARSE_ERROR_TIP = '小Q不太懂您说什么呐回去一定补充知识';
export const SEARCH_EXCEPTION_TIP = '查询出错啦智能小Q还不够聪明请您换个表达再试试';
export const MSG_VALID_TIP = {
[MsgValidTypeEnum.SEARCH_EXCEPTION]: '数据查询异常',
[MsgValidTypeEnum.INVALID]: '小Q不太懂您说什么呐回去一定补充知识',
};
export const PREFIX_CLS = 'ss-chat';
export const PREFIX_CLS = 'ss-chat';
export const AGG_TYPE_MAP = {
SUM: '总计',
AVG: '平均值',
MAX: '最大值',
MIN: '最小值',
}

View File

@@ -12,6 +12,8 @@ export type FieldType = {
id: number;
name: string;
status: number;
domain: number;
type: string;
value: string;
};
@@ -33,7 +35,7 @@ export type EntityInfoType = {
export type DateInfoType = {
dateList: any[];
dateMode: number;
dateMode: string;
period: string;
startDate: string;
endDate: string;
@@ -56,8 +58,11 @@ export type ChatContextType = {
dateInfo: DateInfoType;
dimensions: FieldType[];
metrics: FieldType[];
entity: number;
entity: { alias: string[] };
elementMatches: any[];
queryMode: string;
dimensionFilters: FilterItemType[];
properties: any;
};
export enum MsgValidTypeEnum {
@@ -67,16 +72,11 @@ export enum MsgValidTypeEnum {
INVALID = 3,
};
export type InstructionResonseType = {
export type PluginResonseType = {
description: string;
instructionConfig: {
showElements: { elementId: string, params: any }[];
showType: string;
relaShowElements: { elementId: string, params: any }[];
relaShowType: string;
};
instructionId: number;
instructionType: string;
webPage: { url: string, paramOptions: any, params: any, valueParams: any };
pluginId: number;
pluginType: string;
name: string;
}
@@ -103,9 +103,23 @@ export type MsgDataType = {
queryId: number;
queryMode: string;
queryState: string;
response: InstructionResonseType;
response: PluginResonseType;
};
export enum ParseStateEnum {
COMPLETED = 'COMPLETED',
PENDING = 'PENDING',
FAILED = 'FAILED',
}
export type ParseDataType = {
chatId: number;
queryText: string;
state: ParseStateEnum;
selectedParses: ChatContextType[];
candidateParses: ChatContextType[];
}
export type QueryDataType = {
queryColumns: ColumnType[];
queryResults: any[];
@@ -120,7 +134,7 @@ export type ColumnType = {
dataFormatType: string;
dataFormat: {
decimalPlaces: number;
needmultiply100: boolean;
needMultiply100: boolean;
};
};