[Query Copilot V2] Wire and adjust Output bubble with backend communication (#1599)

* Initial wiring of copilot backend and bubble

* Additional changes in explanation bubbles

* Changes based on checks

* test snapshots updated

---------

Co-authored-by: Predrag Klepic <v-prklepic@microsoft.com>
This commit is contained in:
Predrag Klepic
2023-09-06 19:49:27 +02:00
committed by GitHub
parent 8c2ca4ab8e
commit 76408e2f98
19 changed files with 107 additions and 132 deletions

View File

@@ -37,7 +37,6 @@ export interface QueryCopilotState {
chatMessages: CopilotMessage[];
shouldIncludeInMessages: boolean;
showExplanationBubble: boolean;
showQueryExplanation: boolean;
notebookServerInfo: DataModels.NotebookWorkspaceConnectionInfo;
containerStatus: ContainerInfo;
isAllocatingContainer: boolean;
@@ -72,7 +71,6 @@ export interface QueryCopilotState {
setChatMessages: (chatMessages: CopilotMessage[]) => void;
setShouldIncludeInMessages: (shouldIncludeInMessages: boolean) => void;
setShowExplanationBubble: (showExplanationBubble: boolean) => void;
setShowQueryExplanation: (showQueryExplanation: boolean) => void;
setNotebookServerInfo: (notebookServerInfo: DataModels.NotebookWorkspaceConnectionInfo) => void;
setContainerStatus: (containerStatus: ContainerInfo) => void;
setIsAllocatingContainer: (isAllocatingContainer: boolean) => void;
@@ -113,7 +111,6 @@ export const useQueryCopilot: QueryCopilotStore = create((set) => ({
chatMessages: [],
shouldIncludeInMessages: true,
showExplanationBubble: false,
showQueryExplanation: false,
notebookServerInfo: {
notebookServerEndpoint: undefined,
authToken: undefined,
@@ -158,7 +155,6 @@ export const useQueryCopilot: QueryCopilotStore = create((set) => ({
setChatMessages: (chatMessages: CopilotMessage[]) => set({ chatMessages }),
setShouldIncludeInMessages: (shouldIncludeInMessages: boolean) => set({ shouldIncludeInMessages }),
setShowExplanationBubble: (showExplanationBubble: boolean) => set({ showExplanationBubble }),
setShowQueryExplanation: (showQueryExplanation: boolean) => set({ showQueryExplanation }),
setNotebookServerInfo: (notebookServerInfo: DataModels.NotebookWorkspaceConnectionInfo) =>
set({ notebookServerInfo }),
setContainerStatus: (containerStatus: ContainerInfo) => set({ containerStatus }),
@@ -206,7 +202,6 @@ export const useQueryCopilot: QueryCopilotStore = create((set) => ({
chatMessages: [],
shouldIncludeInMessages: true,
showExplanationBubble: false,
showQueryExplanation: false,
notebookServerInfo: {
notebookServerEndpoint: undefined,
authToken: undefined,