refactor(editor): replace debounce and throttle with lodash (#10639)

This commit is contained in:
Saul-Mirone
2025-03-06 04:46:52 +00:00
parent 824f573ff9
commit 2b30d756e2
27 changed files with 118 additions and 202 deletions

View File

@@ -2,14 +2,11 @@ import {
type EditorHost,
ShadowlessElement,
} from '@blocksuite/affine/block-std';
import {
SignalWatcher,
throttle,
WithDisposable,
} from '@blocksuite/affine/global/utils';
import { SignalWatcher, WithDisposable } from '@blocksuite/affine/global/utils';
import { Signal } from '@preact/signals-core';
import { html, type PropertyValues } from 'lit';
import { property } from 'lit/decorators.js';
import throttle from 'lodash-es/throttle';
import { extractMarkdownFromDoc } from '../../utils/extract';
import type { DocDisplayConfig } from '../chat-config';

View File

@@ -3,10 +3,11 @@ import {
ShadowlessElement,
} from '@blocksuite/affine/block-std';
import { scrollbarStyle } from '@blocksuite/affine/blocks';
import { throttle, WithDisposable } from '@blocksuite/affine/global/utils';
import { WithDisposable } from '@blocksuite/affine/global/utils';
import type { PropertyValues } from 'lit';
import { css, html } from 'lit';
import { property, query } from 'lit/decorators.js';
import throttle from 'lodash-es/throttle';
import type {
AffineAIPanelState,