@@ -28,43 +28,6 @@ const log = logger.scope("setup-run-service");
2828
2929let activityIdCounter = 0 ;
3030
31- const SIMULATED_SUGGESTION_CATEGORIES : DiscoveredTask [ "category" ] [ ] = [
32- "bug" ,
33- "performance" ,
34- "dead_code" ,
35- "duplication" ,
36- "event_tracking" ,
37- "experiment" ,
38- ] ;
39-
40- const SIMULATED_SUGGESTION_INTERVAL_MS = 2500 ;
41- const SIMULATED_SUGGESTION_LIMIT = 12 ;
42-
43- function buildSimulatedSuggestion (
44- repoPath : string ,
45- index : number ,
46- ) : DiscoveredTask {
47- const category =
48- SIMULATED_SUGGESTION_CATEGORIES [
49- index % SIMULATED_SUGGESTION_CATEGORIES . length
50- ] ;
51-
52- return {
53- id : `simulated-suggestion-${ index } ` ,
54- source : "agent" ,
55- repoPath,
56- category,
57- title : `Simulated suggestion ${ index + 1 } ` ,
58- description :
59- "A generated setup suggestion for exercising empty-state layout stability while new content keeps arriving." ,
60- impact :
61- "This is dev-only test data for checking whether the composer and suggestion rows stay anchored during incremental updates." ,
62- recommendation :
63- "Use this simulation to hover and click suggestions while the list keeps changing underneath the same UI surface." ,
64- prompt : `Investigate simulated suggestion ${ index + 1 } ` ,
65- } ;
66- }
67-
6831function extractPathFromRawInput (
6932 tool : string ,
7033 rawInput : Record < string , unknown > | undefined ,
@@ -273,9 +236,6 @@ export class SetupRunService {
273236 private anyDiscoveryEverLaunched = false ;
274237 private discoveryStartingByRepo = new Set < string > ( ) ;
275238 private enricherSuggestionsRunningByRepo = new Set < string > ( ) ;
276- private simulatedSuggestionsRepo : string | null = null ;
277- private simulatedSuggestionsTimer : number | null = null ;
278- private simulatedSuggestionsCount = 0 ;
279239
280240 startSetup ( directory : string ) : void {
281241 // Defense in depth: never auto-run from a non-idle persisted state.
@@ -296,54 +256,6 @@ export class SetupRunService {
296256 this . injectEnricherSuggestions ( directory ) ;
297257 }
298258
299- startSuggestionSimulation (
300- directory : string ,
301- shouldContinue : ( ) => boolean = ( ) => true ,
302- ) : void {
303- if ( ! directory ) return ;
304- if ( this . simulatedSuggestionsRepo === directory ) return ;
305-
306- if ( this . simulatedSuggestionsTimer !== null ) {
307- window . clearInterval ( this . simulatedSuggestionsTimer ) ;
308- }
309-
310- this . simulatedSuggestionsRepo = directory ;
311- this . simulatedSuggestionsCount = 0 ;
312-
313- const addNextSuggestion = ( ) => {
314- if (
315- ! shouldContinue ( ) ||
316- this . simulatedSuggestionsCount >= SIMULATED_SUGGESTION_LIMIT
317- ) {
318- this . stopSuggestionSimulation ( directory ) ;
319- return ;
320- }
321-
322- useSetupStore
323- . getState ( )
324- . addDiscoveredTaskIfMissing (
325- buildSimulatedSuggestion ( directory , this . simulatedSuggestionsCount ) ,
326- ) ;
327- this . simulatedSuggestionsCount += 1 ;
328- } ;
329-
330- addNextSuggestion ( ) ;
331- this . simulatedSuggestionsTimer = window . setInterval (
332- addNextSuggestion ,
333- SIMULATED_SUGGESTION_INTERVAL_MS ,
334- ) ;
335- }
336-
337- stopSuggestionSimulation ( directory ?: string ) : void {
338- if ( directory && this . simulatedSuggestionsRepo !== directory ) return ;
339- if ( this . simulatedSuggestionsTimer !== null ) {
340- window . clearInterval ( this . simulatedSuggestionsTimer ) ;
341- }
342- this . simulatedSuggestionsTimer = null ;
343- this . simulatedSuggestionsRepo = null ;
344- this . simulatedSuggestionsCount = 0 ;
345- }
346-
347259 startDiscovery ( directory : string ) : void {
348260 if ( ! directory ) return ;
349261 if ( this . anyDiscoveryEverLaunched ) return ;
0 commit comments