Fully autonomous AI Agents system capable of performing complex penetration testing tasks
Go ai-agentsai-security-toolanthropicautonomous-agentsgolanggptgraphqlmulti-agent-systemoffensive-securityopen-sourceopenaipenetration-testingpenetration-testing-toolsreactsecurity-automationsecurity-testingsecurity-toolsself-hosted
refactor(markdown-editor): drop a dead barrel export, a band-aid, and rename a param
Sergey Kozyrenkocf34a7b3df5a
diff --git a/frontend/src/components/shared/markdown-editor/index.ts b/frontend/src/components/shared/markdown-editor/index.tsindex 55784129..46775b98 100644--- a/frontend/src/components/shared/markdown-editor/index.ts+++ b/frontend/src/components/shared/markdown-editor/index.ts@@ -5,6 +5,6 @@// route, so wrap it in lazy(() => import('./markdown-editor')) yourself if you need the chunk deferred.export { MarkdownEditorField } from './markdown-editor-field';export type { MarkdownEditorFieldHandle } from './markdown-editor-field';-export { findVariableUseRanges, VARIABLE_RE, variableUseRegex } from './markdown-editor-variable-syntax';+export { VARIABLE_RE, variableUseRegex } from './markdown-editor-variable-syntax';export { EditorViewModeToggle } from './markdown-editor-view-mode';export type { EditorViewMode } from './markdown-editor-view-mode';diff --git a/frontend/src/components/shared/markdown-editor/markdown-editor-image-handle.tsx b/frontend/src/components/shared/markdown-editor/markdown-editor-image-handle.tsxindex 60d0234d..8aac59a6 100644--- a/frontend/src/components/shared/markdown-editor/markdown-editor-image-handle.tsx+++ b/frontend/src/components/shared/markdown-editor/markdown-editor-image-handle.tsx@@ -30,8 +30,8 @@ export function ImageHandle({ editor }: { editor: Editor }) {return (<Popover- onOpenChange={(next) => {- if (!next) {+ onOpenChange={(isOpen) => {+ if (!isOpen) {close();}}}diff --git a/frontend/src/components/shared/markdown-editor/markdown-editor-link-handle.tsx b/frontend/src/components/shared/markdown-editor/markdown-editor-link-handle.tsxindex e8216e05..71dd36e1 100644--- a/frontend/src/components/shared/markdown-editor/markdown-editor-link-handle.tsx+++ b/frontend/src/components/shared/markdown-editor/markdown-editor-link-handle.tsx@@ -29,8 +29,8 @@ export function LinkHandle({ editor }: { editor: Editor }) {return (<Popover- onOpenChange={(next) => {- if (!next) {+ onOpenChange={(isOpen) => {+ if (!isOpen) {close();}}}diff --git a/frontend/src/components/shared/markdown-editor/markdown-editor-textarea.ts b/frontend/src/components/shared/markdown-editor/markdown-editor-textarea.tsindex 9514b3d0..dce3a1a9 100644--- a/frontend/src/components/shared/markdown-editor/markdown-editor-textarea.ts+++ b/frontend/src/components/shared/markdown-editor/markdown-editor-textarea.ts@@ -5,9 +5,7 @@ export function insertAtTextareaCaret(text: string,onChange: (value: string) => void,): void {- const start = Math.max(0, textarea.selectionStart);- const end = Math.max(0, textarea.selectionEnd);- const { value } = textarea;+ const { selectionEnd: end, selectionStart: start, value } = textarea;onChange(value.slice(0, start) + text + value.slice(end));