chore: remove debug logs from issue validation

Remove console.log and logger.debug calls that were added during
development. Keep essential logger.info and logger.error calls.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Kacper
2025-12-28 22:48:32 +01:00
parent 6bdac230df
commit d028932dc8
3 changed files with 3 additions and 45 deletions

View File

@@ -91,19 +91,6 @@ async function runValidation(
try {
// Build the prompt (include comments and linked PRs if provided)
logger.info(
`Building validation prompt for issue #${issueNumber}` +
(comments?.length ? ` with ${comments.length} comments` : ' without comments') +
(linkedPRs?.length ? ` and ${linkedPRs.length} linked PRs` : '')
);
if (comments?.length) {
logger.debug(`Comments included: ${comments.map((c) => c.author).join(', ')}`);
}
if (linkedPRs?.length) {
logger.debug(
`Linked PRs: ${linkedPRs.map((pr) => `#${pr.number} (${pr.state})`).join(', ')}`
);
}
const prompt = buildValidationPrompt(
issueNumber,
issueTitle,
@@ -136,16 +123,12 @@ async function runValidation(
// Execute the query
const stream = query({ prompt, options });
let validationResult: IssueValidationResult | null = null;
let responseText = '';
for await (const msg of stream) {
// Collect assistant text for debugging and emit progress
// Emit progress events for assistant text
if (msg.type === 'assistant' && msg.message?.content) {
for (const block of msg.message.content) {
if (block.type === 'text') {
responseText += block.text;
// Emit progress event
const progressEvent: IssueValidationEvent = {
type: 'issue_validation_progress',
issueNumber,
@@ -162,7 +145,6 @@ async function runValidation(
const resultMsg = msg as { structured_output?: IssueValidationResult };
if (resultMsg.structured_output) {
validationResult = resultMsg.structured_output;
logger.debug('Received structured output:', validationResult);
}
}
@@ -182,7 +164,6 @@ async function runValidation(
// Require structured output
if (!validationResult) {
logger.error('No structured output received from Claude SDK');
logger.debug('Raw response text:', responseText);
throw new Error('Validation failed: no structured output received');
}
@@ -331,9 +312,8 @@ export function createValidateIssueHandler(
validationComments,
validationLinkedPRs
)
.catch((error) => {
.catch(() => {
// Error is already handled inside runValidation (event emitted)
logger.debug('Validation error caught in background handler:', error);
})
.finally(() => {
clearValidationStatus(projectPath, issueNumber);

View File

@@ -54,7 +54,7 @@ export function IssueDetailPanel({
// Helper to get validation options with comments and linked PRs
const getValidationOptions = (forceRevalidate = false) => {
const options = {
return {
forceRevalidate,
comments: includeCommentsInAnalysis && comments.length > 0 ? comments : undefined,
linkedPRs: issue.linkedPRs?.map((pr) => ({
@@ -63,14 +63,6 @@ export function IssueDetailPanel({
state: pr.state,
})),
};
console.log('[IssueDetailPanel] getValidationOptions:', {
includeCommentsInAnalysis,
commentsCount: comments.length,
linkedPRsCount: issue.linkedPRs?.length ?? 0,
willIncludeComments: !!options.comments,
willIncludeLinkedPRs: !!options.linkedPRs,
});
return options;
};
return (

View File

@@ -216,14 +216,6 @@ export function useIssueValidation({
} = {}
) => {
const { forceRevalidate = false, comments, linkedPRs } = options;
console.log('[useIssueValidation] handleValidateIssue called with:', {
issueNumber: issue.number,
forceRevalidate,
commentsProvided: !!comments,
commentsCount: comments?.length ?? 0,
linkedPRsProvided: !!linkedPRs,
linkedPRsCount: linkedPRs?.length ?? 0,
});
if (!currentProject?.path) {
toast.error('No project selected');
@@ -261,12 +253,6 @@ export function useIssueValidation({
comments, // Include comments if provided
linkedPRs, // Include linked PRs if provided
};
console.log('[useIssueValidation] Sending validation request:', {
hasComments: !!validationInput.comments,
commentsCount: validationInput.comments?.length ?? 0,
hasLinkedPRs: !!validationInput.linkedPRs,
linkedPRsCount: validationInput.linkedPRs?.length ?? 0,
});
const result = await api.github.validateIssue(
currentProject.path,
validationInput,