uilint-semantic 0.2.136 → 0.2.137
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-LATUVFI5.js → chunk-PZBCXOZ4.js} +1 -1
- package/dist/chunk-PZBCXOZ4.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/node.js +1 -1
- package/dist/plugin/index.d.ts +1 -1
- package/dist/plugin/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-LATUVFI5.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/plugin/index.ts","../src/plugin/state.ts","../src/plugin/actions.ts","../src/plugin/commands.ts","../src/plugin/panels.ts","../src/plugin/rules.ts","../src/plugin/messages.ts"],"sourcesContent":["/**\n * Semantic Plugin Definition\n *\n * Complete plugin export - NO REACT.\n * This is the main plugin definition that gets registered with pluginRegistry.\n */\n\nimport type { PluginWithHandlers, PluginIssue, IssueContribution } from \"uilint-core\";\nimport { pluginRegistry } from \"uilint-core\";\n\nimport { semanticStateDefinition, type SemanticState } from \"./state.js\";\nimport { semanticActionHandlers } from \"./actions.js\";\nimport { semanticCommands } from \"./commands.js\";\nimport { semanticPanelDefinitions } from \"./panels.js\";\nimport { semanticRuleDefinitions } from \"./rules.js\";\nimport { semanticMessageHandlers } from \"./messages.js\";\n\n/**\n * Semantic plugin definition\n *\n * Contains everything needed for semantic analysis EXCEPT React components.\n * The host (uilint-react) imports this and renders the appropriate UI.\n */\nexport const semanticPlugin: PluginWithHandlers<SemanticState> = {\n // === Metadata ===\n id: \"semantic\",\n name: \"Semantic Analysis\",\n version: \"1.0.0\",\n description: \"Semantic code analysis and duplicate detection\",\n icon: \"brain\",\n\n // === State ===\n state: semanticStateDefinition,\n actions: semanticActionHandlers,\n\n // === UI Contributions (Declarative) ===\n commands: semanticCommands,\n panels: semanticPanelDefinitions,\n // No toolbar groups for semantic plugin\n\n // === Rules ===\n rules: semanticRuleDefinitions,\n handlesRuleCategories: [\"semantic\"],\n\n // === WebSocket ===\n messageHandlers: semanticMessageHandlers,\n\n // === Issue Aggregation ===\n // Note: Issues come from ESLint rule, not directly from plugin state\n // This is here for completeness but semantic issues flow through ESLint\n getIssues: (_state: SemanticState): IssueContribution => {\n // Semantic issues are reported by the no-semantic-duplicates ESLint rule\n // They don't come from plugin state, so we return empty\n return { pluginId: \"semantic\", issues: new Map() };\n },\n\n // === Browser Actions ===\n // Semantic plugin doesn't need browser actions\n browserActions: [],\n};\n\n// Auto-register with plugin registry on import\npluginRegistry.register(semanticPlugin);\n\n// Export types for host apps\nexport type { SemanticState } from \"./state.js\";\n\nexport default semanticPlugin;\n","/**\n * Semantic Plugin State\n *\n * State shape and initial state for the semantic plugin.\n * No React - pure TypeScript.\n */\n\nimport type { StateDefinition } from \"uilint-core\";\nimport type { IndexStatus, IndexProgress, IndexStats } from \"../types.js\";\n\n/**\n * Semantic plugin state shape\n */\nexport interface SemanticState {\n // === Index Status ===\n /** Current index status */\n indexStatus: IndexStatus;\n /** Indexing progress */\n indexProgress: IndexProgress | null;\n /** Index statistics from last build */\n indexStats: IndexStats | null;\n\n // === Error State ===\n /** Last indexing error */\n lastIndexError: string | null;\n\n // === UI State ===\n /** Currently selected duplicate for inspector */\n selectedDuplicate: {\n sourceDataLoc: string;\n targetDataLoc: string;\n similarity: number;\n } | null;\n}\n\n/**\n * Initial state for the semantic plugin\n */\nexport const semanticInitialState: SemanticState = {\n indexStatus: \"idle\",\n indexProgress: null,\n indexStats: null,\n lastIndexError: null,\n selectedDuplicate: null,\n};\n\n/**\n * State definition for the plugin system\n */\nexport const semanticStateDefinition: StateDefinition<SemanticState> = {\n initialState: semanticInitialState,\n\n computed: {\n /** Whether index is ready for queries */\n isIndexReady: (state) => state.indexStatus === \"ready\",\n\n /** Whether indexing is in progress */\n isIndexing: (state) => state.indexStatus === \"indexing\",\n\n /** Whether there was an error */\n hasError: (state) => state.indexStatus === \"error\" || state.lastIndexError !== null,\n\n /** Progress percentage (0-100) */\n progressPercent: (state) => {\n if (!state.indexProgress) return 0;\n if (state.indexProgress.total === 0) return 0;\n return Math.round((state.indexProgress.current / state.indexProgress.total) * 100);\n },\n },\n\n persist: {\n key: \"uilint-semantic\",\n include: [], // Don't persist anything for now\n },\n};\n","/**\n * Semantic Plugin Action Handlers\n *\n * Plain functions that handle plugin actions.\n * No React - uses PluginContext for state management.\n */\n\nimport type { ActionHandlers, PluginContext } from \"uilint-core\";\nimport type { SemanticState } from \"./state.js\";\nimport type { IndexStats } from \"../types.js\";\n\n// Helper type for cleaner action handler definitions\ntype Handler<TPayload = void> = (\n ctx: PluginContext<SemanticState>,\n payload: TPayload\n) => void | Promise<void>;\n\n// Cast helper for proper typing - wraps typed handlers to satisfy ActionHandlers\nconst h = <TPayload = void>(fn: Handler<TPayload>): Handler<unknown> =>\n fn as Handler<unknown>;\n\n/**\n * Action handlers for the semantic plugin\n */\nexport const semanticActionHandlers: ActionHandlers<SemanticState> = {\n /**\n * Start indexing\n */\n \"start-indexing\": h((ctx) => {\n ctx.setState({\n indexStatus: \"indexing\",\n indexProgress: { current: 0, total: 0 },\n lastIndexError: null,\n });\n\n // Request server to start indexing\n ctx.websocket.send({ type: \"duplicates:index\" });\n }),\n\n /**\n * Handle indexing started\n */\n \"handle-indexing-start\": h((ctx) => {\n ctx.setState({\n indexStatus: \"indexing\",\n indexProgress: { current: 0, total: 0, message: \"Starting...\" },\n lastIndexError: null,\n });\n }),\n\n /**\n * Handle indexing progress\n */\n \"handle-indexing-progress\": h<{ message: string; current?: number; total?: number }>(\n (ctx, payload) => {\n ctx.setState({\n indexProgress: {\n current: payload.current ?? 0,\n total: payload.total ?? 0,\n message: payload.message,\n },\n });\n }\n ),\n\n /**\n * Handle indexing complete\n */\n \"handle-indexing-complete\": h<IndexStats>((ctx, payload) => {\n ctx.setState({\n indexStatus: \"ready\",\n indexProgress: null,\n indexStats: payload,\n lastIndexError: null,\n });\n }),\n\n /**\n * Handle indexing error\n */\n \"handle-indexing-error\": h<{ error: string }>((ctx, payload) => {\n ctx.setState({\n indexStatus: \"error\",\n indexProgress: null,\n lastIndexError: payload.error,\n });\n }),\n\n /**\n * Select a duplicate for viewing in inspector\n */\n \"select-duplicate\": h<{ sourceDataLoc: string; targetDataLoc: string; similarity: number }>(\n (ctx, payload) => {\n ctx.setState({ selectedDuplicate: payload });\n ctx.openInspector(\"duplicates\", payload);\n }\n ),\n\n /**\n * Clear selected duplicate\n */\n \"clear-selected-duplicate\": h((ctx) => {\n ctx.setState({ selectedDuplicate: null });\n }),\n\n /**\n * Toggle heatmap filter for duplicates\n */\n \"toggle-heatmap-filter\": h<{ sourceDataLoc: string; targetDataLoc: string }>(\n (ctx, payload) => {\n ctx.setHeatmapFilter(\n [payload.sourceDataLoc, payload.targetDataLoc],\n \"Duplicate Code\"\n );\n }\n ),\n\n /**\n * Clear heatmap filter\n */\n \"clear-heatmap-filter\": h((ctx) => {\n ctx.clearHeatmapFilter();\n }),\n\n /**\n * Open file in editor\n */\n \"open-editor\": h<{ dataLoc: string }>((ctx, payload) => {\n ctx.openInEditor(payload.dataLoc);\n }),\n};\n","/**\n * Semantic Plugin Commands\n *\n * Command palette commands for the semantic plugin.\n * Declarative - no React.\n */\n\nimport type { CommandDefinition } from \"uilint-core\";\n\n/**\n * Semantic plugin commands\n */\nexport const semanticCommands: CommandDefinition[] = [\n {\n id: \"semantic:rebuild-index\",\n title: \"Rebuild Duplicates Index\",\n keywords: [\"semantic\", \"duplicates\", \"index\", \"rebuild\", \"scan\"],\n category: \"Semantic\",\n subtitle: \"Rebuild the semantic code index for duplicate detection\",\n icon: \"refresh\",\n action: { type: \"start-indexing\" },\n },\n {\n id: \"semantic:clear-filter\",\n title: \"Clear Duplicate Filter\",\n keywords: [\"semantic\", \"duplicates\", \"clear\", \"filter\", \"heatmap\"],\n category: \"Semantic\",\n subtitle: \"Clear the heatmap filter for duplicates\",\n icon: \"x\",\n action: { type: \"clear-heatmap-filter\" },\n },\n];\n","/**\n * Semantic Plugin Panels\n *\n * Inspector panel definitions for the semantic plugin.\n * Declarative - no React.\n */\n\nimport type { PanelDefinition } from \"uilint-core\";\n\n/**\n * Duplicates inspector panel\n */\nexport const duplicatesPanelDefinition: PanelDefinition = {\n id: \"duplicates\",\n title: \"Duplicate Code\",\n priority: 10,\n\n loading: {\n when: { binding: \"isLoading\" },\n message: \"Loading code comparison...\",\n },\n\n empty: {\n when: { expression: \"!sourceCode && !targetCode\" },\n message: \"No duplicate information available.\",\n icon: \"search\",\n },\n\n layout: [\n // Similarity badge\n {\n type: \"badge\",\n variant: \"similarity\",\n value: { binding: \"similarity\" },\n centered: true,\n },\n\n // Source code section\n {\n type: \"code-viewer\",\n label: \"This Code\",\n icon: \"target\",\n code: {\n fetch: {\n type: \"source-code\",\n params: {\n filePath: { binding: \"sourceLocation.filePath\" },\n line: { binding: \"sourceLocation.startLine\" },\n contextAbove: 10,\n contextBelow: 10,\n },\n },\n },\n location: { binding: \"sourceLocation\" },\n diffHighlighting: true,\n maxHeight: 250,\n onNavigate: {\n type: \"open-editor\",\n payloadBindings: { dataLoc: \"sourceDataLoc\" },\n },\n },\n\n // Target code section\n {\n type: \"code-viewer\",\n label: \"Similar Code\",\n icon: \"link\",\n code: {\n fetch: {\n type: \"source-code\",\n params: {\n filePath: { binding: \"targetLocation.filePath\" },\n line: { binding: \"targetLocation.startLine\" },\n contextAbove: 10,\n contextBelow: 10,\n },\n },\n },\n location: { binding: \"targetLocation\" },\n diffHighlighting: true,\n maxHeight: 250,\n onNavigate: {\n type: \"open-editor\",\n payloadBindings: { dataLoc: \"targetDataLoc\" },\n },\n },\n\n { type: \"divider\", spacing: \"medium\" },\n\n // Actions\n {\n type: \"actions\",\n direction: \"row\",\n actions: [\n {\n id: \"toggle-heatmap\",\n label: {\n condition: { binding: \"heatmapFilterActive\" },\n true: \"Clear Heatmap Filter\",\n false: \"Focus in Heatmap\",\n },\n icon: \"filter\",\n variant: \"primary\",\n action: {\n type: \"toggle-heatmap-filter\",\n payloadBindings: {\n sourceDataLoc: \"sourceDataLoc\",\n targetDataLoc: \"targetDataLoc\",\n },\n },\n },\n ],\n },\n ],\n};\n\n/**\n * Index status panel\n */\nexport const indexStatusPanelDefinition: PanelDefinition = {\n id: \"semantic-index-status\",\n title: \"Index Status\",\n priority: 5,\n\n layout: [\n // Status badge\n {\n type: \"badge\",\n variant: \"status\",\n value: { binding: \"indexStatus\" },\n centered: true,\n },\n\n // Progress (when indexing)\n {\n type: \"conditional\",\n condition: { expression: \"indexStatus === 'indexing'\" },\n then: [\n {\n type: \"progress\",\n value: { binding: \"progressPercent\" },\n label: { binding: \"indexProgress.message\" },\n },\n ],\n },\n\n // Stats (when ready)\n {\n type: \"conditional\",\n condition: { expression: \"indexStatus === 'ready' && indexStats\" },\n then: [\n {\n type: \"text\",\n content: { binding: \"indexStats.totalChunks\" },\n variant: \"body\",\n },\n ],\n },\n\n // Error (when error)\n {\n type: \"conditional\",\n condition: { expression: \"indexStatus === 'error'\" },\n then: [\n {\n type: \"text\",\n content: { binding: \"lastIndexError\" },\n variant: \"error\",\n },\n ],\n },\n\n { type: \"divider\" },\n\n // Rebuild action\n {\n type: \"actions\",\n direction: \"column\",\n actions: [\n {\n id: \"rebuild-index\",\n label: \"Rebuild Index\",\n icon: \"refresh\",\n variant: \"secondary\",\n action: { type: \"start-indexing\" },\n disabled: { binding: \"isIndexing\" },\n },\n ],\n },\n ],\n};\n\n/**\n * All semantic panel definitions\n */\nexport const semanticPanelDefinitions: PanelDefinition[] = [\n duplicatesPanelDefinition,\n indexStatusPanelDefinition,\n];\n","/**\n * Semantic Plugin Rules\n *\n * Rule definitions for the semantic plugin.\n * Declarative - no React.\n */\n\nimport type { RuleDefinition } from \"uilint-core\";\n\n/**\n * no-semantic-duplicates rule definition\n */\nexport const noSemanticDuplicatesRuleDefinition: RuleDefinition = {\n id: \"no-semantic-duplicates\",\n name: \"No Semantic Duplicates\",\n description: \"Warns when code is semantically similar to existing code\",\n category: \"semantic\",\n icon: \"search\",\n defaultSeverity: \"warn\",\n defaultEnabled: false,\n heatmapColor: \"#f59e0b\", // Amber\n customInspectorPanel: \"duplicates\",\n requirements: [\n {\n type: \"semantic-index\",\n description: \"Requires semantic index for duplicate detection\",\n setupHint: \"Run: uilint duplicates index\",\n },\n ],\n defaultOptions: [\n {\n threshold: 0.75,\n indexPath: \".uilint/.duplicates-index\",\n minLines: 3,\n confidenceLevel: \"low\",\n useStructuralBoost: true,\n includeSameFile: false,\n kind: \"all\",\n },\n ],\n optionSchema: {\n fields: [\n {\n key: \"threshold\",\n label: \"Similarity Threshold\",\n type: \"number\",\n defaultValue: 0.75,\n description: \"Minimum similarity score (0-1) to report as duplicate.\",\n },\n {\n key: \"confidenceLevel\",\n label: \"Minimum Confidence\",\n type: \"select\",\n defaultValue: \"low\",\n options: [\n { value: \"high\", label: \"High (>90%) - Likely copy-paste\" },\n { value: \"medium\", label: \"Medium (>75%) - Semantically similar\" },\n { value: \"low\", label: \"Low (>60%) - Possibly related\" },\n ],\n description: \"Minimum confidence level for reported duplicates.\",\n },\n {\n key: \"kind\",\n label: \"Chunk Type\",\n type: \"select\",\n defaultValue: \"all\",\n options: [\n { value: \"all\", label: \"All\" },\n { value: \"component\", label: \"Components\" },\n { value: \"hook\", label: \"Hooks\" },\n { value: \"function\", label: \"Functions\" },\n ],\n description: \"Filter duplicates by code type.\",\n },\n {\n key: \"useStructuralBoost\",\n label: \"Use Structural Analysis\",\n type: \"boolean\",\n defaultValue: true,\n description: \"Include structural similarity (props, JSX, hooks) in scoring.\",\n },\n {\n key: \"includeSameFile\",\n label: \"Include Same-File Duplicates\",\n type: \"boolean\",\n defaultValue: false,\n description: \"Report duplicates within the same file.\",\n },\n {\n key: \"minLines\",\n label: \"Minimum Lines\",\n type: \"number\",\n defaultValue: 3,\n description: \"Minimum number of lines for a code chunk.\",\n },\n ],\n },\n docs: `\n## No Semantic Duplicates Rule\n\nThis rule detects code that is semantically similar to existing code in your codebase.\n\n### How it Works\n\n1. The codebase is indexed to extract \"chunks\" (components, hooks, functions)\n2. Each chunk is embedded using an AI model to capture semantic meaning\n3. During linting, chunks are compared against the index\n4. Similar chunks above the threshold are reported\n\n### Confidence Levels\n\n- **High (>90%)**: Very likely copy-paste or near-identical code\n- **Medium (>75%)**: Semantically similar, possibly refactorable\n- **Low (>60%)**: Possibly related, worth reviewing\n\n### Setup\n\n1. Run \\`uilint duplicates index\\` to build the semantic index\n2. Enable this rule in your ESLint config\n3. The rule will report duplicates during linting\n\n### Performance\n\nThe rule uses a pre-built index, so it's fast during linting.\nRe-index periodically to keep the index up to date.\n `.trim(),\n};\n\n/**\n * All semantic rule definitions\n */\nexport const semanticRuleDefinitions: RuleDefinition[] = [\n noSemanticDuplicatesRuleDefinition,\n];\n","/**\n * Semantic Plugin Message Handlers\n *\n * WebSocket message handlers for the semantic plugin.\n * Plain functions - no React.\n */\n\nimport type { MessageHandlers, PluginContext } from \"uilint-core\";\nimport type { SemanticState } from \"./state.js\";\nimport type {\n DuplicatesIndexingStartMessage,\n DuplicatesIndexingProgressMessage,\n DuplicatesIndexingCompleteMessage,\n DuplicatesIndexingErrorMessage,\n} from \"../types.js\";\n\n/**\n * Message handlers for the semantic plugin\n */\nexport const semanticMessageHandlers: MessageHandlers<SemanticState> = {\n /**\n * Handle indexing started\n */\n \"duplicates:indexing:start\": (ctx: PluginContext<SemanticState>) => {\n ctx.dispatch(\"handle-indexing-start\");\n },\n\n /**\n * Handle indexing progress\n */\n \"duplicates:indexing:progress\": (\n ctx: PluginContext<SemanticState>,\n message: unknown\n ) => {\n const msg = message as DuplicatesIndexingProgressMessage;\n ctx.dispatch(\"handle-indexing-progress\", {\n message: msg.message,\n current: msg.current,\n total: msg.total,\n });\n },\n\n /**\n * Handle indexing complete\n */\n \"duplicates:indexing:complete\": (\n ctx: PluginContext<SemanticState>,\n message: unknown\n ) => {\n const msg = message as DuplicatesIndexingCompleteMessage;\n ctx.dispatch(\"handle-indexing-complete\", {\n added: msg.added,\n modified: msg.modified,\n deleted: msg.deleted,\n totalChunks: msg.totalChunks,\n duration: msg.duration,\n });\n },\n\n /**\n * Handle indexing error\n */\n \"duplicates:indexing:error\": (\n ctx: PluginContext<SemanticState>,\n message: unknown\n ) => {\n const msg = message as DuplicatesIndexingErrorMessage;\n ctx.dispatch(\"handle-indexing-error\", { error: msg.error });\n },\n};\n"],"mappings":";AAQA,SAAS,sBAAsB;;;AC8BxB,IAAM,uBAAsC;AAAA,EACjD,aAAa;AAAA,EACb,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,gBAAgB;AAAA,EAChB,mBAAmB;AACrB;AAKO,IAAM,0BAA0D;AAAA,EACrE,cAAc;AAAA,EAEd,UAAU;AAAA;AAAA,IAER,cAAc,CAAC,UAAU,MAAM,gBAAgB;AAAA;AAAA,IAG/C,YAAY,CAAC,UAAU,MAAM,gBAAgB;AAAA;AAAA,IAG7C,UAAU,CAAC,UAAU,MAAM,gBAAgB,WAAW,MAAM,mBAAmB;AAAA;AAAA,IAG/E,iBAAiB,CAAC,UAAU;AAC1B,UAAI,CAAC,MAAM,cAAe,QAAO;AACjC,UAAI,MAAM,cAAc,UAAU,EAAG,QAAO;AAC5C,aAAO,KAAK,MAAO,MAAM,cAAc,UAAU,MAAM,cAAc,QAAS,GAAG;AAAA,IACnF;AAAA,EACF;AAAA,EAEA,SAAS;AAAA,IACP,KAAK;AAAA,IACL,SAAS,CAAC;AAAA;AAAA,EACZ;AACF;;;ACxDA,IAAM,IAAI,CAAkB,OAC1B;AAKK,IAAM,yBAAwD;AAAA;AAAA;AAAA;AAAA,EAInE,kBAAkB,EAAE,CAAC,QAAQ;AAC3B,QAAI,SAAS;AAAA,MACX,aAAa;AAAA,MACb,eAAe,EAAE,SAAS,GAAG,OAAO,EAAE;AAAA,MACtC,gBAAgB;AAAA,IAClB,CAAC;AAGD,QAAI,UAAU,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAA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D;AAAA;AAAA,EAE/D,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,SAAS;AAAA,EACT,aAAa;AAAA,EACb,MAAM;AAAA;AAAA,EAGN,OAAO;AAAA,EACP,SAAS;AAAA;AAAA,EAGT,UAAU;AAAA,EACV,QAAQ;AAAA;AAAA;AAAA,EAIR,OAAO;AAAA,EACP,uBAAuB,CAAC,UAAU;AAAA;AAAA,EAGlC,iBAAiB;AAAA;AAAA;AAAA;AAAA,EAKjB,WAAW,CAAC,WAA6C;AAGvD,WAAO,EAAE,UAAU,YAAY,QAAQ,oBAAI,IAAI,EAAE;AAAA,EACnD;AAAA;AAAA;AAAA,EAIA,gBAAgB,CAAC;AACnB;AAGA,eAAe,SAAS,cAAc;AAKtC,IAAO,iBAAQ;","names":[]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { a as Chunk, C as ChunkKind, b as ConfidenceLevel, c as DuplicateGroup, D as DuplicateMatch, h as DuplicatesIndexingCompleteMessage, i as DuplicatesIndexingErrorMessage, g as DuplicatesIndexingProgressMessage, f as DuplicatesIndexingStartMessage, j as DuplicatesMessage, F as FindDuplicatesOptions, d as IndexProgress, e as IndexStats, I as IndexStatus,
|
|
1
|
+
export { a as Chunk, C as ChunkKind, b as ConfidenceLevel, c as DuplicateGroup, D as DuplicateMatch, h as DuplicatesIndexingCompleteMessage, i as DuplicatesIndexingErrorMessage, g as DuplicatesIndexingProgressMessage, f as DuplicatesIndexingStartMessage, j as DuplicatesMessage, F as FindDuplicatesOptions, d as IndexProgress, e as IndexStats, I as IndexStatus, SemanticState, S as SimilaritySearchOptions, default as semanticPlugin } from './plugin/index.js';
|
|
2
2
|
import 'uilint-core';
|
package/dist/index.js
CHANGED
package/dist/node.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { a as Chunk, C as ChunkKind, b as ConfidenceLevel, c as DuplicateGroup, D as DuplicateMatch, h as DuplicatesIndexingCompleteMessage, i as DuplicatesIndexingErrorMessage, g as DuplicatesIndexingProgressMessage, f as DuplicatesIndexingStartMessage, j as DuplicatesMessage, F as FindDuplicatesOptions, d as IndexProgress, e as IndexStats, I as IndexStatus,
|
|
1
|
+
export { a as Chunk, C as ChunkKind, b as ConfidenceLevel, c as DuplicateGroup, D as DuplicateMatch, h as DuplicatesIndexingCompleteMessage, i as DuplicatesIndexingErrorMessage, g as DuplicatesIndexingProgressMessage, f as DuplicatesIndexingStartMessage, j as DuplicatesMessage, F as FindDuplicatesOptions, d as IndexProgress, e as IndexStats, I as IndexStatus, SemanticState, S as SimilaritySearchOptions, default as semanticPlugin } from './plugin/index.js';
|
|
2
2
|
import 'uilint-core';
|
package/dist/node.js
CHANGED
package/dist/plugin/index.d.ts
CHANGED
|
@@ -204,4 +204,4 @@ interface SemanticState {
|
|
|
204
204
|
*/
|
|
205
205
|
declare const semanticPlugin: PluginWithHandlers<SemanticState>;
|
|
206
206
|
|
|
207
|
-
export { type ChunkKind as C, type DuplicateMatch as D, type FindDuplicatesOptions as F, type IndexStatus as I, type SimilaritySearchOptions as S, type Chunk as a, type ConfidenceLevel as b, type DuplicateGroup as c, type IndexProgress as d, semanticPlugin as default, type IndexStats as e, type DuplicatesIndexingStartMessage as f, type DuplicatesIndexingProgressMessage as g, type DuplicatesIndexingCompleteMessage as h, type DuplicatesIndexingErrorMessage as i, type DuplicatesMessage as j,
|
|
207
|
+
export { type ChunkKind as C, type DuplicateMatch as D, type FindDuplicatesOptions as F, type IndexStatus as I, type SimilaritySearchOptions as S, type SemanticState, type Chunk as a, type ConfidenceLevel as b, type DuplicateGroup as c, type IndexProgress as d, semanticPlugin as default, type IndexStats as e, type DuplicatesIndexingStartMessage as f, type DuplicatesIndexingProgressMessage as g, type DuplicatesIndexingCompleteMessage as h, type DuplicatesIndexingErrorMessage as i, type DuplicatesMessage as j, semanticPlugin };
|
package/dist/plugin/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uilint-semantic",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.137",
|
|
4
4
|
"description": "Semantic code analysis and duplicate detection for UILint",
|
|
5
5
|
"author": "Peter Suggate",
|
|
6
6
|
"repository": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"dist"
|
|
31
31
|
],
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"uilint-core": "0.2.
|
|
33
|
+
"uilint-core": "0.2.137"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@typescript-eslint/typescript-estree": "^8.35.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/plugin/index.ts","../src/plugin/state.ts","../src/plugin/actions.ts","../src/plugin/commands.ts","../src/plugin/panels.ts","../src/plugin/rules.ts","../src/plugin/messages.ts"],"sourcesContent":["/**\n * Semantic Plugin Definition\n *\n * Complete plugin export - NO REACT.\n * This is the main plugin definition that gets registered with pluginRegistry.\n */\n\nimport type { PluginWithHandlers, PluginIssue, IssueContribution } from \"uilint-core\";\nimport { pluginRegistry } from \"uilint-core\";\n\nimport { semanticStateDefinition, type SemanticState } from \"./state.js\";\nimport { semanticActionHandlers } from \"./actions.js\";\nimport { semanticCommands } from \"./commands.js\";\nimport { semanticPanelDefinitions } from \"./panels.js\";\nimport { semanticRuleDefinitions } from \"./rules.js\";\nimport { semanticMessageHandlers } from \"./messages.js\";\n\n/**\n * Semantic plugin definition\n *\n * Contains everything needed for semantic analysis EXCEPT React components.\n * The host (uilint-react) imports this and renders the appropriate UI.\n */\nexport const semanticPlugin: PluginWithHandlers<SemanticState> = {\n // === Metadata ===\n id: \"semantic\",\n name: \"Semantic Analysis\",\n version: \"1.0.0\",\n description: \"Semantic code analysis and duplicate detection\",\n icon: \"brain\",\n\n // === State ===\n state: semanticStateDefinition,\n actions: semanticActionHandlers,\n\n // === UI Contributions (Declarative) ===\n commands: semanticCommands,\n panels: semanticPanelDefinitions,\n // No toolbar groups for semantic plugin\n\n // === Rules ===\n rules: semanticRuleDefinitions,\n handlesRuleCategories: [\"semantic\"],\n\n // === WebSocket ===\n messageHandlers: semanticMessageHandlers,\n\n // === Issue Aggregation ===\n // Note: Issues come from ESLint rule, not directly from plugin state\n // This is here for completeness but semantic issues flow through ESLint\n getIssues: (_state: SemanticState): IssueContribution => {\n // Semantic issues are reported by the no-semantic-duplicates ESLint rule\n // They don't come from plugin state, so we return empty\n return { pluginId: \"semantic\", issues: new Map() };\n },\n\n // === Browser Actions ===\n // Semantic plugin doesn't need browser actions\n browserActions: [],\n};\n\n// Auto-register with plugin registry on import\npluginRegistry.register(semanticPlugin);\n\nexport default semanticPlugin;\n","/**\n * Semantic Plugin State\n *\n * State shape and initial state for the semantic plugin.\n * No React - pure TypeScript.\n */\n\nimport type { StateDefinition } from \"uilint-core\";\nimport type { IndexStatus, IndexProgress, IndexStats } from \"../types.js\";\n\n/**\n * Semantic plugin state shape\n */\nexport interface SemanticState {\n // === Index Status ===\n /** Current index status */\n indexStatus: IndexStatus;\n /** Indexing progress */\n indexProgress: IndexProgress | null;\n /** Index statistics from last build */\n indexStats: IndexStats | null;\n\n // === Error State ===\n /** Last indexing error */\n lastIndexError: string | null;\n\n // === UI State ===\n /** Currently selected duplicate for inspector */\n selectedDuplicate: {\n sourceDataLoc: string;\n targetDataLoc: string;\n similarity: number;\n } | null;\n}\n\n/**\n * Initial state for the semantic plugin\n */\nexport const semanticInitialState: SemanticState = {\n indexStatus: \"idle\",\n indexProgress: null,\n indexStats: null,\n lastIndexError: null,\n selectedDuplicate: null,\n};\n\n/**\n * State definition for the plugin system\n */\nexport const semanticStateDefinition: StateDefinition<SemanticState> = {\n initialState: semanticInitialState,\n\n computed: {\n /** Whether index is ready for queries */\n isIndexReady: (state) => state.indexStatus === \"ready\",\n\n /** Whether indexing is in progress */\n isIndexing: (state) => state.indexStatus === \"indexing\",\n\n /** Whether there was an error */\n hasError: (state) => state.indexStatus === \"error\" || state.lastIndexError !== null,\n\n /** Progress percentage (0-100) */\n progressPercent: (state) => {\n if (!state.indexProgress) return 0;\n if (state.indexProgress.total === 0) return 0;\n return Math.round((state.indexProgress.current / state.indexProgress.total) * 100);\n },\n },\n\n persist: {\n key: \"uilint-semantic\",\n include: [], // Don't persist anything for now\n },\n};\n","/**\n * Semantic Plugin Action Handlers\n *\n * Plain functions that handle plugin actions.\n * No React - uses PluginContext for state management.\n */\n\nimport type { ActionHandlers, PluginContext } from \"uilint-core\";\nimport type { SemanticState } from \"./state.js\";\nimport type { IndexStats } from \"../types.js\";\n\n// Helper type for cleaner action handler definitions\ntype Handler<TPayload = void> = (\n ctx: PluginContext<SemanticState>,\n payload: TPayload\n) => void | Promise<void>;\n\n// Cast helper for proper typing - wraps typed handlers to satisfy ActionHandlers\nconst h = <TPayload = void>(fn: Handler<TPayload>): Handler<unknown> =>\n fn as Handler<unknown>;\n\n/**\n * Action handlers for the semantic plugin\n */\nexport const semanticActionHandlers: ActionHandlers<SemanticState> = {\n /**\n * Start indexing\n */\n \"start-indexing\": h((ctx) => {\n ctx.setState({\n indexStatus: \"indexing\",\n indexProgress: { current: 0, total: 0 },\n lastIndexError: null,\n });\n\n // Request server to start indexing\n ctx.websocket.send({ type: \"duplicates:index\" });\n }),\n\n /**\n * Handle indexing started\n */\n \"handle-indexing-start\": h((ctx) => {\n ctx.setState({\n indexStatus: \"indexing\",\n indexProgress: { current: 0, total: 0, message: \"Starting...\" },\n lastIndexError: null,\n });\n }),\n\n /**\n * Handle indexing progress\n */\n \"handle-indexing-progress\": h<{ message: string; current?: number; total?: number }>(\n (ctx, payload) => {\n ctx.setState({\n indexProgress: {\n current: payload.current ?? 0,\n total: payload.total ?? 0,\n message: payload.message,\n },\n });\n }\n ),\n\n /**\n * Handle indexing complete\n */\n \"handle-indexing-complete\": h<IndexStats>((ctx, payload) => {\n ctx.setState({\n indexStatus: \"ready\",\n indexProgress: null,\n indexStats: payload,\n lastIndexError: null,\n });\n }),\n\n /**\n * Handle indexing error\n */\n \"handle-indexing-error\": h<{ error: string }>((ctx, payload) => {\n ctx.setState({\n indexStatus: \"error\",\n indexProgress: null,\n lastIndexError: payload.error,\n });\n }),\n\n /**\n * Select a duplicate for viewing in inspector\n */\n \"select-duplicate\": h<{ sourceDataLoc: string; targetDataLoc: string; similarity: number }>(\n (ctx, payload) => {\n ctx.setState({ selectedDuplicate: payload });\n ctx.openInspector(\"duplicates\", payload);\n }\n ),\n\n /**\n * Clear selected duplicate\n */\n \"clear-selected-duplicate\": h((ctx) => {\n ctx.setState({ selectedDuplicate: null });\n }),\n\n /**\n * Toggle heatmap filter for duplicates\n */\n \"toggle-heatmap-filter\": h<{ sourceDataLoc: string; targetDataLoc: string }>(\n (ctx, payload) => {\n ctx.setHeatmapFilter(\n [payload.sourceDataLoc, payload.targetDataLoc],\n \"Duplicate Code\"\n );\n }\n ),\n\n /**\n * Clear heatmap filter\n */\n \"clear-heatmap-filter\": h((ctx) => {\n ctx.clearHeatmapFilter();\n }),\n\n /**\n * Open file in editor\n */\n \"open-editor\": h<{ dataLoc: string }>((ctx, payload) => {\n ctx.openInEditor(payload.dataLoc);\n }),\n};\n","/**\n * Semantic Plugin Commands\n *\n * Command palette commands for the semantic plugin.\n * Declarative - no React.\n */\n\nimport type { CommandDefinition } from \"uilint-core\";\n\n/**\n * Semantic plugin commands\n */\nexport const semanticCommands: CommandDefinition[] = [\n {\n id: \"semantic:rebuild-index\",\n title: \"Rebuild Duplicates Index\",\n keywords: [\"semantic\", \"duplicates\", \"index\", \"rebuild\", \"scan\"],\n category: \"Semantic\",\n subtitle: \"Rebuild the semantic code index for duplicate detection\",\n icon: \"refresh\",\n action: { type: \"start-indexing\" },\n },\n {\n id: \"semantic:clear-filter\",\n title: \"Clear Duplicate Filter\",\n keywords: [\"semantic\", \"duplicates\", \"clear\", \"filter\", \"heatmap\"],\n category: \"Semantic\",\n subtitle: \"Clear the heatmap filter for duplicates\",\n icon: \"x\",\n action: { type: \"clear-heatmap-filter\" },\n },\n];\n","/**\n * Semantic Plugin Panels\n *\n * Inspector panel definitions for the semantic plugin.\n * Declarative - no React.\n */\n\nimport type { PanelDefinition } from \"uilint-core\";\n\n/**\n * Duplicates inspector panel\n */\nexport const duplicatesPanelDefinition: PanelDefinition = {\n id: \"duplicates\",\n title: \"Duplicate Code\",\n priority: 10,\n\n loading: {\n when: { binding: \"isLoading\" },\n message: \"Loading code comparison...\",\n },\n\n empty: {\n when: { expression: \"!sourceCode && !targetCode\" },\n message: \"No duplicate information available.\",\n icon: \"search\",\n },\n\n layout: [\n // Similarity badge\n {\n type: \"badge\",\n variant: \"similarity\",\n value: { binding: \"similarity\" },\n centered: true,\n },\n\n // Source code section\n {\n type: \"code-viewer\",\n label: \"This Code\",\n icon: \"target\",\n code: {\n fetch: {\n type: \"source-code\",\n params: {\n filePath: { binding: \"sourceLocation.filePath\" },\n line: { binding: \"sourceLocation.startLine\" },\n contextAbove: 10,\n contextBelow: 10,\n },\n },\n },\n location: { binding: \"sourceLocation\" },\n diffHighlighting: true,\n maxHeight: 250,\n onNavigate: {\n type: \"open-editor\",\n payloadBindings: { dataLoc: \"sourceDataLoc\" },\n },\n },\n\n // Target code section\n {\n type: \"code-viewer\",\n label: \"Similar Code\",\n icon: \"link\",\n code: {\n fetch: {\n type: \"source-code\",\n params: {\n filePath: { binding: \"targetLocation.filePath\" },\n line: { binding: \"targetLocation.startLine\" },\n contextAbove: 10,\n contextBelow: 10,\n },\n },\n },\n location: { binding: \"targetLocation\" },\n diffHighlighting: true,\n maxHeight: 250,\n onNavigate: {\n type: \"open-editor\",\n payloadBindings: { dataLoc: \"targetDataLoc\" },\n },\n },\n\n { type: \"divider\", spacing: \"medium\" },\n\n // Actions\n {\n type: \"actions\",\n direction: \"row\",\n actions: [\n {\n id: \"toggle-heatmap\",\n label: {\n condition: { binding: \"heatmapFilterActive\" },\n true: \"Clear Heatmap Filter\",\n false: \"Focus in Heatmap\",\n },\n icon: \"filter\",\n variant: \"primary\",\n action: {\n type: \"toggle-heatmap-filter\",\n payloadBindings: {\n sourceDataLoc: \"sourceDataLoc\",\n targetDataLoc: \"targetDataLoc\",\n },\n },\n },\n ],\n },\n ],\n};\n\n/**\n * Index status panel\n */\nexport const indexStatusPanelDefinition: PanelDefinition = {\n id: \"semantic-index-status\",\n title: \"Index Status\",\n priority: 5,\n\n layout: [\n // Status badge\n {\n type: \"badge\",\n variant: \"status\",\n value: { binding: \"indexStatus\" },\n centered: true,\n },\n\n // Progress (when indexing)\n {\n type: \"conditional\",\n condition: { expression: \"indexStatus === 'indexing'\" },\n then: [\n {\n type: \"progress\",\n value: { binding: \"progressPercent\" },\n label: { binding: \"indexProgress.message\" },\n },\n ],\n },\n\n // Stats (when ready)\n {\n type: \"conditional\",\n condition: { expression: \"indexStatus === 'ready' && indexStats\" },\n then: [\n {\n type: \"text\",\n content: { binding: \"indexStats.totalChunks\" },\n variant: \"body\",\n },\n ],\n },\n\n // Error (when error)\n {\n type: \"conditional\",\n condition: { expression: \"indexStatus === 'error'\" },\n then: [\n {\n type: \"text\",\n content: { binding: \"lastIndexError\" },\n variant: \"error\",\n },\n ],\n },\n\n { type: \"divider\" },\n\n // Rebuild action\n {\n type: \"actions\",\n direction: \"column\",\n actions: [\n {\n id: \"rebuild-index\",\n label: \"Rebuild Index\",\n icon: \"refresh\",\n variant: \"secondary\",\n action: { type: \"start-indexing\" },\n disabled: { binding: \"isIndexing\" },\n },\n ],\n },\n ],\n};\n\n/**\n * All semantic panel definitions\n */\nexport const semanticPanelDefinitions: PanelDefinition[] = [\n duplicatesPanelDefinition,\n indexStatusPanelDefinition,\n];\n","/**\n * Semantic Plugin Rules\n *\n * Rule definitions for the semantic plugin.\n * Declarative - no React.\n */\n\nimport type { RuleDefinition } from \"uilint-core\";\n\n/**\n * no-semantic-duplicates rule definition\n */\nexport const noSemanticDuplicatesRuleDefinition: RuleDefinition = {\n id: \"no-semantic-duplicates\",\n name: \"No Semantic Duplicates\",\n description: \"Warns when code is semantically similar to existing code\",\n category: \"semantic\",\n icon: \"search\",\n defaultSeverity: \"warn\",\n defaultEnabled: false,\n heatmapColor: \"#f59e0b\", // Amber\n customInspectorPanel: \"duplicates\",\n requirements: [\n {\n type: \"semantic-index\",\n description: \"Requires semantic index for duplicate detection\",\n setupHint: \"Run: uilint duplicates index\",\n },\n ],\n defaultOptions: [\n {\n threshold: 0.75,\n indexPath: \".uilint/.duplicates-index\",\n minLines: 3,\n confidenceLevel: \"low\",\n useStructuralBoost: true,\n includeSameFile: false,\n kind: \"all\",\n },\n ],\n optionSchema: {\n fields: [\n {\n key: \"threshold\",\n label: \"Similarity Threshold\",\n type: \"number\",\n defaultValue: 0.75,\n description: \"Minimum similarity score (0-1) to report as duplicate.\",\n },\n {\n key: \"confidenceLevel\",\n label: \"Minimum Confidence\",\n type: \"select\",\n defaultValue: \"low\",\n options: [\n { value: \"high\", label: \"High (>90%) - Likely copy-paste\" },\n { value: \"medium\", label: \"Medium (>75%) - Semantically similar\" },\n { value: \"low\", label: \"Low (>60%) - Possibly related\" },\n ],\n description: \"Minimum confidence level for reported duplicates.\",\n },\n {\n key: \"kind\",\n label: \"Chunk Type\",\n type: \"select\",\n defaultValue: \"all\",\n options: [\n { value: \"all\", label: \"All\" },\n { value: \"component\", label: \"Components\" },\n { value: \"hook\", label: \"Hooks\" },\n { value: \"function\", label: \"Functions\" },\n ],\n description: \"Filter duplicates by code type.\",\n },\n {\n key: \"useStructuralBoost\",\n label: \"Use Structural Analysis\",\n type: \"boolean\",\n defaultValue: true,\n description: \"Include structural similarity (props, JSX, hooks) in scoring.\",\n },\n {\n key: \"includeSameFile\",\n label: \"Include Same-File Duplicates\",\n type: \"boolean\",\n defaultValue: false,\n description: \"Report duplicates within the same file.\",\n },\n {\n key: \"minLines\",\n label: \"Minimum Lines\",\n type: \"number\",\n defaultValue: 3,\n description: \"Minimum number of lines for a code chunk.\",\n },\n ],\n },\n docs: `\n## No Semantic Duplicates Rule\n\nThis rule detects code that is semantically similar to existing code in your codebase.\n\n### How it Works\n\n1. The codebase is indexed to extract \"chunks\" (components, hooks, functions)\n2. Each chunk is embedded using an AI model to capture semantic meaning\n3. During linting, chunks are compared against the index\n4. Similar chunks above the threshold are reported\n\n### Confidence Levels\n\n- **High (>90%)**: Very likely copy-paste or near-identical code\n- **Medium (>75%)**: Semantically similar, possibly refactorable\n- **Low (>60%)**: Possibly related, worth reviewing\n\n### Setup\n\n1. Run \\`uilint duplicates index\\` to build the semantic index\n2. Enable this rule in your ESLint config\n3. The rule will report duplicates during linting\n\n### Performance\n\nThe rule uses a pre-built index, so it's fast during linting.\nRe-index periodically to keep the index up to date.\n `.trim(),\n};\n\n/**\n * All semantic rule definitions\n */\nexport const semanticRuleDefinitions: RuleDefinition[] = [\n noSemanticDuplicatesRuleDefinition,\n];\n","/**\n * Semantic Plugin Message Handlers\n *\n * WebSocket message handlers for the semantic plugin.\n * Plain functions - no React.\n */\n\nimport type { MessageHandlers, PluginContext } from \"uilint-core\";\nimport type { SemanticState } from \"./state.js\";\nimport type {\n DuplicatesIndexingStartMessage,\n DuplicatesIndexingProgressMessage,\n DuplicatesIndexingCompleteMessage,\n DuplicatesIndexingErrorMessage,\n} from \"../types.js\";\n\n/**\n * Message handlers for the semantic plugin\n */\nexport const semanticMessageHandlers: MessageHandlers<SemanticState> = {\n /**\n * Handle indexing started\n */\n \"duplicates:indexing:start\": (ctx: PluginContext<SemanticState>) => {\n ctx.dispatch(\"handle-indexing-start\");\n },\n\n /**\n * Handle indexing progress\n */\n \"duplicates:indexing:progress\": (\n ctx: PluginContext<SemanticState>,\n message: unknown\n ) => {\n const msg = message as DuplicatesIndexingProgressMessage;\n ctx.dispatch(\"handle-indexing-progress\", {\n message: msg.message,\n current: msg.current,\n total: msg.total,\n });\n },\n\n /**\n * Handle indexing complete\n */\n \"duplicates:indexing:complete\": (\n ctx: PluginContext<SemanticState>,\n message: unknown\n ) => {\n const msg = message as DuplicatesIndexingCompleteMessage;\n ctx.dispatch(\"handle-indexing-complete\", {\n added: msg.added,\n modified: msg.modified,\n deleted: msg.deleted,\n totalChunks: msg.totalChunks,\n duration: msg.duration,\n });\n },\n\n /**\n * Handle indexing error\n */\n \"duplicates:indexing:error\": (\n ctx: PluginContext<SemanticState>,\n message: unknown\n ) => {\n const msg = message as DuplicatesIndexingErrorMessage;\n ctx.dispatch(\"handle-indexing-error\", { error: msg.error });\n },\n};\n"],"mappings":";AAQA,SAAS,sBAAsB;;;AC8BxB,IAAM,uBAAsC;AAAA,EACjD,aAAa;AAAA,EACb,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,gBAAgB;AAAA,EAChB,mBAAmB;AACrB;AAKO,IAAM,0BAA0D;AAAA,EACrE,cAAc;AAAA,EAEd,UAAU;AAAA;AAAA,IAER,cAAc,CAAC,UAAU,MAAM,gBAAgB;AAAA;AAAA,IAG/C,YAAY,CAAC,UAAU,MAAM,gBAAgB;AAAA;AAAA,IAG7C,UAAU,CAAC,UAAU,MAAM,gBAAgB,WAAW,MAAM,mBAAmB;AAAA;AAAA,IAG/E,iBAAiB,CAAC,UAAU;AAC1B,UAAI,CAAC,MAAM,cAAe,QAAO;AACjC,UAAI,MAAM,cAAc,UAAU,EAAG,QAAO;AAC5C,aAAO,KAAK,MAAO,MAAM,cAAc,UAAU,MAAM,cAAc,QAAS,GAAG;AAAA,IACnF;AAAA,EACF;AAAA,EAEA,SAAS;AAAA,IACP,KAAK;AAAA,IACL,SAAS,CAAC;AAAA;AAAA,EACZ;AACF;;;ACxDA,IAAM,IAAI,CAAkB,OAC1B;AAKK,IAAM,yBAAwD;AAAA;AAAA;AAAA;AAAA,EAInE,kBAAkB,EAAE,CAAC,QAAQ;AAC3B,QAAI,SAAS;AAAA,MACX,aAAa;AAAA,MACb,eAAe,EAAE,SAAS,GAAG,OAAO,EAAE;AAAA,MACtC,gBAAgB;AAAA,IAClB,CAAC;AAGD,QAAI,UAAU,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAAA,EACjD,CAAC;AA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