mirror of https://github.com/buster-so/buster.git
query checks
This commit is contained in:
parent
70d5b8925f
commit
b08892744e
|
@ -34,11 +34,13 @@ const crosshairPlugin: Plugin<'line'> = {
|
|||
|
||||
// Initialize the crosshair state
|
||||
beforeInit(chart: Chart) {
|
||||
if (!chart) return;
|
||||
chart.$crosshair = { x: null, y: null };
|
||||
},
|
||||
|
||||
// Capture mouse events to update the crosshair coordinates
|
||||
afterEvent(chart: Chart, args: { event: ChartEvent }) {
|
||||
if (!chart) return;
|
||||
const event = args.event;
|
||||
if (event.type === 'mousemove') {
|
||||
chart.$crosshair = chart.$crosshair || { x: null, y: null };
|
||||
|
@ -54,12 +56,13 @@ const crosshairPlugin: Plugin<'line'> = {
|
|||
|
||||
// Draw the crosshair lines and labels after the chart is rendered
|
||||
afterDraw(chart: Chart, args, options: CrosshairPluginOptions) {
|
||||
if (!chart) return;
|
||||
const {
|
||||
ctx,
|
||||
chartArea: { top, bottom, left, right }
|
||||
} = chart;
|
||||
const crosshair = chart.$crosshair;
|
||||
if (!crosshair) return;
|
||||
if (!crosshair || !ctx) return;
|
||||
const { x, y } = crosshair;
|
||||
|
||||
// Only draw if the pointer is within the chart area
|
||||
|
|
|
@ -95,7 +95,7 @@ export const InputTextArea = React.forwardRef<HTMLTextAreaElement, InputTextArea
|
|||
|
||||
const adjustHeight = useMemoizedFn(() => {
|
||||
const textarea = textareaRef.current;
|
||||
if (!textarea || !autoResize || textarea.value === '') return;
|
||||
if (!textarea || !autoResize) return;
|
||||
|
||||
const minHeight = calculateMinHeight();
|
||||
if (!minHeight) return;
|
||||
|
|
|
@ -88,6 +88,9 @@ export const useChatStreamMessage = () => {
|
|||
onUpdateChat(iChat);
|
||||
removeBlackBoxMessage({ messageId: iChat.message_ids[iChat.message_ids.length - 1] });
|
||||
prefetchLastMessageMetricData(iChat, iChatMessages);
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: [queryKeys.chatsGetList().queryKey, queryKeys.metricsGetList().queryKey]
|
||||
});
|
||||
});
|
||||
|
||||
const stopChatCallback = useMemoizedFn((chatId: string) => {
|
||||
|
|
Loading…
Reference in New Issue