Skip to content
This repository was archived by the owner on Sep 23, 2025. It is now read-only.

Commit 0e86acc

Browse files
committed
Add proper PlacementState type to fileNavigation.ts
Replace generic Map<string, any> with specific PlacementState interface for better type safety in placement memory parameter.
1 parent cb796ca commit 0e86acc

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

extension/src/fileNavigation.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ import * as vscode from 'vscode';
22
import { parseDialecticUrl, DialecticUrl } from './dialecticUrl';
33
import { searchInFile, getBestSearchResult, formatSearchResults, needsDisambiguation } from './searchEngine';
44

5+
// Placement state for unified link and comment management
6+
interface PlacementState {
7+
isPlaced: boolean;
8+
chosenLocation: any; // FileRange, SearchResult, or other location type
9+
wasAmbiguous: boolean; // Whether this item had multiple possible locations
10+
}
11+
512
/**
613
* Open a file location specified by a dialectic URL
714
* Full implementation with regex search support extracted from reviewWebview
@@ -10,7 +17,7 @@ export async function openDialecticUrl(
1017
dialecticUrl: string,
1118
outputChannel: vscode.OutputChannel,
1219
baseUri?: vscode.Uri,
13-
placementMemory?: Map<string, any>
20+
placementMemory?: Map<string, PlacementState>
1421
): Promise<void> {
1522
try {
1623
// Parse the dialectic URL to extract components

0 commit comments

Comments
 (0)