mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-04 09:13:08 +00:00
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:
@@ -91,19 +91,6 @@ async function runValidation(
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// Build the prompt (include comments and linked PRs if provided)
|
// 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(
|
const prompt = buildValidationPrompt(
|
||||||
issueNumber,
|
issueNumber,
|
||||||
issueTitle,
|
issueTitle,
|
||||||
@@ -136,16 +123,12 @@ async function runValidation(
|
|||||||
// Execute the query
|
// Execute the query
|
||||||
const stream = query({ prompt, options });
|
const stream = query({ prompt, options });
|
||||||
let validationResult: IssueValidationResult | null = null;
|
let validationResult: IssueValidationResult | null = null;
|
||||||
let responseText = '';
|
|
||||||
|
|
||||||
for await (const msg of stream) {
|
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) {
|
if (msg.type === 'assistant' && msg.message?.content) {
|
||||||
for (const block of msg.message.content) {
|
for (const block of msg.message.content) {
|
||||||
if (block.type === 'text') {
|
if (block.type === 'text') {
|
||||||
responseText += block.text;
|
|
||||||
|
|
||||||
// Emit progress event
|
|
||||||
const progressEvent: IssueValidationEvent = {
|
const progressEvent: IssueValidationEvent = {
|
||||||
type: 'issue_validation_progress',
|
type: 'issue_validation_progress',
|
||||||
issueNumber,
|
issueNumber,
|
||||||
@@ -162,7 +145,6 @@ async function runValidation(
|
|||||||
const resultMsg = msg as { structured_output?: IssueValidationResult };
|
const resultMsg = msg as { structured_output?: IssueValidationResult };
|
||||||
if (resultMsg.structured_output) {
|
if (resultMsg.structured_output) {
|
||||||
validationResult = resultMsg.structured_output;
|
validationResult = resultMsg.structured_output;
|
||||||
logger.debug('Received structured output:', validationResult);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -182,7 +164,6 @@ async function runValidation(
|
|||||||
// Require structured output
|
// Require structured output
|
||||||
if (!validationResult) {
|
if (!validationResult) {
|
||||||
logger.error('No structured output received from Claude SDK');
|
logger.error('No structured output received from Claude SDK');
|
||||||
logger.debug('Raw response text:', responseText);
|
|
||||||
throw new Error('Validation failed: no structured output received');
|
throw new Error('Validation failed: no structured output received');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -331,9 +312,8 @@ export function createValidateIssueHandler(
|
|||||||
validationComments,
|
validationComments,
|
||||||
validationLinkedPRs
|
validationLinkedPRs
|
||||||
)
|
)
|
||||||
.catch((error) => {
|
.catch(() => {
|
||||||
// Error is already handled inside runValidation (event emitted)
|
// Error is already handled inside runValidation (event emitted)
|
||||||
logger.debug('Validation error caught in background handler:', error);
|
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
clearValidationStatus(projectPath, issueNumber);
|
clearValidationStatus(projectPath, issueNumber);
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ export function IssueDetailPanel({
|
|||||||
|
|
||||||
// Helper to get validation options with comments and linked PRs
|
// Helper to get validation options with comments and linked PRs
|
||||||
const getValidationOptions = (forceRevalidate = false) => {
|
const getValidationOptions = (forceRevalidate = false) => {
|
||||||
const options = {
|
return {
|
||||||
forceRevalidate,
|
forceRevalidate,
|
||||||
comments: includeCommentsInAnalysis && comments.length > 0 ? comments : undefined,
|
comments: includeCommentsInAnalysis && comments.length > 0 ? comments : undefined,
|
||||||
linkedPRs: issue.linkedPRs?.map((pr) => ({
|
linkedPRs: issue.linkedPRs?.map((pr) => ({
|
||||||
@@ -63,14 +63,6 @@ export function IssueDetailPanel({
|
|||||||
state: pr.state,
|
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 (
|
return (
|
||||||
|
|||||||
@@ -216,14 +216,6 @@ export function useIssueValidation({
|
|||||||
} = {}
|
} = {}
|
||||||
) => {
|
) => {
|
||||||
const { forceRevalidate = false, comments, linkedPRs } = options;
|
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) {
|
if (!currentProject?.path) {
|
||||||
toast.error('No project selected');
|
toast.error('No project selected');
|
||||||
@@ -261,12 +253,6 @@ export function useIssueValidation({
|
|||||||
comments, // Include comments if provided
|
comments, // Include comments if provided
|
||||||
linkedPRs, // Include linked PRs 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(
|
const result = await api.github.validateIssue(
|
||||||
currentProject.path,
|
currentProject.path,
|
||||||
validationInput,
|
validationInput,
|
||||||
|
|||||||
Reference in New Issue
Block a user