mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-03-27 20:18:42 +00:00
* Implement copilot for user database * Fix minor bugs * fix bugs * Add user database copilot * Add placeholder text on copilot * Add AFEC adn killswitch * Add new v2 sampledatabase endpoint * Add telemetry * fix telemetry bug * Add query edited telemetry * add authorization header * Add back to the staging env for phoenix * point to stage for phoenix * Preview commit for test env * Preview link for staging * change the staging url * fix lint, unit tests * fix lint, unit tests * fix formatting
20 lines
846 B
TypeScript
20 lines
846 B
TypeScript
import { QueryDocumentsPerPage } from "Explorer/QueryCopilot/Shared/QueryCopilotClient";
|
|
import { QueryResultSection } from "Explorer/Tabs/QueryTab/QueryResultSection";
|
|
import { useQueryCopilot } from "hooks/useQueryCopilot";
|
|
import React from "react";
|
|
|
|
export const QueryCopilotResults: React.FC = (): JSX.Element => {
|
|
return (
|
|
<QueryResultSection
|
|
isMongoDB={false}
|
|
queryEditorContent={useQueryCopilot.getState().selectedQuery || useQueryCopilot.getState().query}
|
|
error={useQueryCopilot.getState().errorMessage}
|
|
queryResults={useQueryCopilot.getState().queryResults}
|
|
isExecuting={useQueryCopilot.getState().isExecuting}
|
|
executeQueryDocumentsPage={(firstItemIndex: number) =>
|
|
QueryDocumentsPerPage(firstItemIndex, useQueryCopilot.getState().queryIterator, useQueryCopilot)
|
|
}
|
|
/>
|
|
);
|
|
};
|