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
style(frontend): fix prettier drift blocking CI
Sergey Kozyrenkoed6b77939587
diff --git a/frontend/src/components/shared/markdown-editor/markdown-editor-content-integrity.test.ts b/frontend/src/components/shared/markdown-editor/markdown-editor-content-integrity.test.tsindex 34d09c88..f95b9386 100644--- a/frontend/src/components/shared/markdown-editor/markdown-editor-content-integrity.test.ts+++ b/frontend/src/components/shared/markdown-editor/markdown-editor-content-integrity.test.ts@@ -2,7 +2,6 @@ import { beforeAll, describe, expect, it } from 'vitest';import { roundTrip, setupEditorJsdom } from './markdown-editor-test-setup';-beforeAll(setupEditorJsdom);const mulberry32 = (seed: number) => () => {diff --git a/frontend/src/components/shared/markdown-editor/markdown-editor-corpus.test.ts b/frontend/src/components/shared/markdown-editor/markdown-editor-corpus.test.tsindex e477c119..0db50916 100644--- a/frontend/src/components/shared/markdown-editor/markdown-editor-corpus.test.ts+++ b/frontend/src/components/shared/markdown-editor/markdown-editor-corpus.test.ts@@ -4,7 +4,6 @@ import { beforeAll, describe, expect, it } from 'vitest';import { roundTrip, setupEditorJsdom } from './markdown-editor-test-setup';-beforeAll(setupEditorJsdom);const variables = (s: string) => s.match(/\{\{[^{}]*\}\}/g) ?? [];diff --git a/frontend/src/components/shared/markdown-editor/markdown-editor-extensions.test.ts b/frontend/src/components/shared/markdown-editor/markdown-editor-extensions.test.tsindex ec5462c5..c9e0bd65 100644--- a/frontend/src/components/shared/markdown-editor/markdown-editor-extensions.test.ts+++ b/frontend/src/components/shared/markdown-editor/markdown-editor-extensions.test.ts@@ -148,18 +148,30 @@ describe('bare URLs and emails stay literal — explicit [links] still work', ()});describe('inline marks round-trip', () => {- it.each(['**bold**', '*italic*', '`code span`', '~~strike~~', '[a link](https://example.com)', '**bold `code` end**'])(- 'preserves %s',- (s) => {- expect(roundTrip(s)).toContain(s);- },- );+ it.each([+ '**bold**',+ '*italic*',+ '`code span`',+ '~~strike~~',+ '[a link](https://example.com)',+ '**bold `code` end**',+ ])('preserves %s', (s) => {+ expect(roundTrip(s)).toContain(s);+ });});describe('MarkdownTable — cell pipes escaped + alignment preserved, idempotent', () => {it.each([- ['pipe in a code-span cell', '| Op | Meaning |\n| --- | --- |\n| `\\|` | pipe op |\n| `\\|\\|` | or op |', 'pipe op'],- ['pipes inside inline code', '| Name | Payload |\n| --- | --- |\n| chain | `echo \\| base64 \\| sh` |', 'base64'],+ [+ 'pipe in a code-span cell',+ '| Op | Meaning |\n| --- | --- |\n| `\\|` | pipe op |\n| `\\|\\|` | or op |',+ 'pipe op',+ ],+ [+ 'pipes inside inline code',+ '| Name | Payload |\n| --- | --- |\n| chain | `echo \\| base64 \\| sh` |',+ 'base64',+ ],])('cell content survives two saves: %s', (_l, src, marker) => {const save1 = roundTrip(src);const save2 = roundTrip(save1);diff --git a/frontend/src/components/shared/markdown-editor/markdown-editor-extensions.ts b/frontend/src/components/shared/markdown-editor/markdown-editor-extensions.tsindex 6d78e9f4..d40bf388 100644--- a/frontend/src/components/shared/markdown-editor/markdown-editor-extensions.ts+++ b/frontend/src/components/shared/markdown-editor/markdown-editor-extensions.ts@@ -63,7 +63,9 @@ const StarterKitFaithful = StarterKit.extend({}if (extension.name === 'codeBlock') {- return extension.extend({ parseMarkdown: parseFaithfulCodeBlock } as Parameters<typeof extension.extend>[0]);+ return extension.extend({ parseMarkdown: parseFaithfulCodeBlock } as Parameters<+ typeof extension.extend+ >[0]);}return extension;diff --git a/frontend/src/components/shared/markdown-editor/markdown-editor-handle.test.tsx b/frontend/src/components/shared/markdown-editor/markdown-editor-handle.test.tsxindex 6b65a1a3..02b16c5c 100644--- a/frontend/src/components/shared/markdown-editor/markdown-editor-handle.test.tsx+++ b/frontend/src/components/shared/markdown-editor/markdown-editor-handle.test.tsx@@ -13,7 +13,11 @@ describe('MarkdownEditor imperative handle', () => {it('cycleToVariable: rejects a missing variable, cycles an existing one (with wrap) without throwing', async () => {const ref = createRef<MarkdownEditorHandle>();const { container } = render(- <MarkdownEditor onChange={vi.fn()} ref={ref} value={'a {{.Foo}} b {{.Foo}} c {{.Bar}}'} />,+ <MarkdownEditor+ onChange={vi.fn()}+ ref={ref}+ value={'a {{.Foo}} b {{.Foo}} c {{.Bar}}'}+ />,);await waitFor(() => expect(proseMirror(container)?.textContent).toContain('Foo'));@@ -28,7 +32,13 @@ describe('MarkdownEditor imperative handle', () => {it('insertAtCursor: emits the inserted text through onChange', async () => {const onChange = vi.fn();const ref = createRef<MarkdownEditorHandle>();- const { container } = render(<MarkdownEditor onChange={onChange} ref={ref} value={'seed'} />);+ const { container } = render(+ <MarkdownEditor+ onChange={onChange}+ ref={ref}+ value={'seed'}+ />,+ );await waitFor(() => expect(proseMirror(container)?.textContent).toContain('seed'));onChange.mockClear();@@ -42,7 +52,13 @@ describe('MarkdownEditor value↔editor sync', () => {it('suppresses onChange for an echoed value and applies a real external change', async () => {const onChange = vi.fn();const ref = createRef<MarkdownEditorHandle>();- const { container, rerender } = render(<MarkdownEditor onChange={onChange} ref={ref} value={'start'} />);+ const { container, rerender } = render(+ <MarkdownEditor+ onChange={onChange}+ ref={ref}+ value={'start'}+ />,+ );await waitFor(() => expect(proseMirror(container)?.textContent).toContain('start'));ref.current?.insertAtCursor(' edited');@@ -51,12 +67,24 @@ describe('MarkdownEditor value↔editor sync', () => {onChange.mockClear();// Echo our own emitted value back → the sync effect must early-return, not re-fire onChange.- rerender(<MarkdownEditor onChange={onChange} ref={ref} value={emitted} />);+ rerender(+ <MarkdownEditor+ onChange={onChange}+ ref={ref}+ value={emitted}+ />,+ );await Promise.resolve();expect(onChange).not.toHaveBeenCalled();// A genuine external change → the editor content updates (setContent uses emitUpdate:false, so no onChange).- rerender(<MarkdownEditor onChange={onChange} ref={ref} value={'external replacement text'} />);+ rerender(+ <MarkdownEditor+ onChange={onChange}+ ref={ref}+ value={'external replacement text'}+ />,+ );await waitFor(() => expect(proseMirror(container)?.textContent).toContain('external replacement text'));expect(onChange).not.toHaveBeenCalled();});diff --git a/frontend/src/components/shared/markdown-editor/markdown-editor-highlight.test.ts b/frontend/src/components/shared/markdown-editor/markdown-editor-highlight.test.tsindex 4b38dfbe..7df4bc00 100644--- a/frontend/src/components/shared/markdown-editor/markdown-editor-highlight.test.ts+++ b/frontend/src/components/shared/markdown-editor/markdown-editor-highlight.test.ts@@ -18,12 +18,9 @@ describe('VARIABLE_RE — {{ go-template actions }}', () => {expect(matches(VARIABLE_RE, input)).toEqual(expected);});- it.each(['{single brace}', '${shell}', 'open {{ no close', 'a }} before {{ open'])(- 'does NOT match %s',- (input) => {- expect(matches(VARIABLE_RE, input)).toEqual([]);- },- );+ it.each(['{single brace}', '${shell}', 'open {{ no close', 'a }} before {{ open'])('does NOT match %s', (input) => {+ expect(matches(VARIABLE_RE, input)).toEqual([]);+ });});describe('TAG_RE — <xml-like tags>', () => {diff --git a/frontend/src/components/shared/markdown-editor/markdown-editor-paste.test.ts b/frontend/src/components/shared/markdown-editor/markdown-editor-paste.test.tsindex f24a0aef..4b0486d0 100644--- a/frontend/src/components/shared/markdown-editor/markdown-editor-paste.test.ts+++ b/frontend/src/components/shared/markdown-editor/markdown-editor-paste.test.ts@@ -43,7 +43,9 @@ describe('shouldParseMarkdownOnPaste — markdown-parse plain text, defer rich sdescribe('MarkdownPaste — the parsed payload matches load (same faithful markdown layer)', () => {const pasteEvent = (text: string, html = ''): ClipboardEvent =>({- clipboardData: { getData: (type: string) => (type === 'text/html' ? html : type === 'text/plain' ? text : '') },+ clipboardData: {+ getData: (type: string) => (type === 'text/html' ? html : type === 'text/plain' ? text : ''),+ },}) as unknown as ClipboardEvent;const pasteHtml = (text: string, html = ''): string => {diff --git a/frontend/src/features/knowledges/knowledge-form-blocker.test.tsx b/frontend/src/features/knowledges/knowledge-form-blocker.test.tsxindex 71944e33..6549b760 100644--- a/frontend/src/features/knowledges/knowledge-form-blocker.test.tsx+++ b/frontend/src/features/knowledges/knowledge-form-blocker.test.tsx@@ -26,12 +26,22 @@ vi.mock('./knowledge-form-layout', () => {<Controllercontrol={control}name="content"- render={({ field }) => <textarea aria-label="content" {...field} />}+ render={({ field }) => (+ <textarea+ aria-label="content"+ {...field}+ />+ )}/><Controllercontrol={control}name="question"- render={({ field }) => <input aria-label="question" {...field} />}+ render={({ field }) => (+ <input+ aria-label="question"+ {...field}+ />+ )}/></>);diff --git a/frontend/src/features/knowledges/knowledge-form.test.tsx b/frontend/src/features/knowledges/knowledge-form.test.tsxindex c4468638..e97ac10b 100644--- a/frontend/src/features/knowledges/knowledge-form.test.tsx+++ b/frontend/src/features/knowledges/knowledge-form.test.tsx@@ -41,12 +41,22 @@ vi.mock('./knowledge-form-layout', () => {<Controllercontrol={control}name="content"- render={({ field }) => <textarea aria-label="content" {...field} />}+ render={({ field }) => (+ <textarea+ aria-label="content"+ {...field}+ />+ )}/><Controllercontrol={control}name="question"- render={({ field }) => <input aria-label="question" {...field} />}+ render={({ field }) => (+ <input+ aria-label="question"+ {...field}+ />+ )}/></>);diff --git a/frontend/src/pages/settings/settings-prompt.tsx b/frontend/src/pages/settings/settings-prompt.tsxindex 7b5279d0..95700032 100644--- a/frontend/src/pages/settings/settings-prompt.tsx+++ b/frontend/src/pages/settings/settings-prompt.tsx@@ -47,12 +47,18 @@ import type {ValidatePromptMutation,} from '@/graphql/types';-import { type EditorViewMode, EditorViewModeToggle, findVariableUseRanges, type MarkdownEditorHandle, VARIABLE_RE, variableProbe } from '@/components/shared/markdown-editor';+import {+ type EditorViewMode,+ EditorViewModeToggle,+ findVariableUseRanges,+ type MarkdownEditorHandle,+ VARIABLE_RE,+ variableProbe,+} from '@/components/shared/markdown-editor';type AgentPrompt = AgentPrompts;type AgentPrompts = { human?: DefaultPrompt; system: DefaultPrompt };-import {AppHeader,AppHeaderAction,