Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@
"@google/generative-ai": "^0.24.1",
"@modelcontextprotocol/sdk": "^1.26.0",
"@types/node": "^20.0.0",
"@types/uuid": "^10.0.0",
"dotenv": "^16.3.1",
"uuid": "^11.1.0",
"zod": "^3.22.0"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions src/services/ConversationManager.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { v4 as uuidv4 } from 'uuid';
import { randomUUID } from 'node:crypto';
import { ChatSession } from '@google/generative-ai';
import { ClaudeCodeContext, DeepAnalysisResult } from '../models/types.js';
import { SessionError, SessionNotFoundError } from '../errors/index.js';
Expand Down Expand Up @@ -50,7 +50,7 @@ export class ConversationManager {
}

createSession(context: ClaudeCodeContext): string {
const sessionId = uuidv4();
const sessionId = randomUUID();
const now = Date.now();

const state: ConversationState = {
Expand Down Expand Up @@ -130,7 +130,7 @@ export class ConversationManager {
}

const turn: ConversationTurn = {
id: uuidv4(),
id: randomUUID(),
role,
content,
timestamp: Date.now(),
Expand Down Expand Up @@ -283,4 +283,4 @@ export class ConversationManager {
.filter(s => s.status === 'active')
.length;
}
}
}
3 changes: 1 addition & 2 deletions src/services/HypothesisTournamentService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import { ConversationalGeminiService } from './ConversationalGeminiService.js';
import { ConversationManager } from './ConversationManager.js';
import { SecureCodeReader } from '../utils/SecureCodeReader.js';
import { v4 as uuidv4 } from 'uuid';

interface TournamentConfig {
maxHypotheses: number;
Expand Down Expand Up @@ -52,13 +51,13 @@
issue: string,
): Promise<TournamentResult> {
const startTime = Date.now();

Check failure on line 54 in src/services/HypothesisTournamentService.ts

View workflow job for this annotation

GitHub Actions / test (20.x)

Trailing spaces not allowed

Check failure on line 54 in src/services/HypothesisTournamentService.ts

View workflow job for this annotation

GitHub Actions / test (22.x)

Trailing spaces not allowed

Check failure on line 54 in src/services/HypothesisTournamentService.ts

View workflow job for this annotation

GitHub Actions / test (18.x)

Trailing spaces not allowed
// Generate initial hypotheses
const hypotheses = await this.generateHypotheses(context, issue);

Check failure on line 57 in src/services/HypothesisTournamentService.ts

View workflow job for this annotation

GitHub Actions / test (20.x)

Trailing spaces not allowed

Check failure on line 57 in src/services/HypothesisTournamentService.ts

View workflow job for this annotation

GitHub Actions / test (22.x)

Trailing spaces not allowed

Check failure on line 57 in src/services/HypothesisTournamentService.ts

View workflow job for this annotation

GitHub Actions / test (18.x)

Trailing spaces not allowed
const rounds: TournamentRound[] = [];
let remainingHypotheses = [...hypotheses];
let allFindings: Finding[] = [];

Check failure on line 60 in src/services/HypothesisTournamentService.ts

View workflow job for this annotation

GitHub Actions / test (20.x)

'allFindings' is never reassigned. Use 'const' instead

Check failure on line 60 in src/services/HypothesisTournamentService.ts

View workflow job for this annotation

GitHub Actions / test (22.x)

'allFindings' is never reassigned. Use 'const' instead

Check failure on line 60 in src/services/HypothesisTournamentService.ts

View workflow job for this annotation

GitHub Actions / test (18.x)

'allFindings' is never reassigned. Use 'const' instead

// Run tournament rounds
for (let roundNum = 1; roundNum <= this.config.maxRounds && remainingHypotheses.length > 1; roundNum++) {
Expand All @@ -69,7 +68,7 @@
issue,
rounds,
);

Check failure on line 71 in src/services/HypothesisTournamentService.ts

View workflow job for this annotation

GitHub Actions / test (20.x)

Trailing spaces not allowed

Check failure on line 71 in src/services/HypothesisTournamentService.ts

View workflow job for this annotation

GitHub Actions / test (22.x)

Trailing spaces not allowed

Check failure on line 71 in src/services/HypothesisTournamentService.ts

View workflow job for this annotation

GitHub Actions / test (18.x)

Trailing spaces not allowed
rounds.push(round);
allFindings.push(...this.extractFindingsFromRound(round));

Expand Down Expand Up @@ -769,4 +768,4 @@

return { primary, secondary };
}
}
}
Loading