-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(release): 1.3.0 #106
Conversation
@@ -95,6 +95,7 @@ export default abstract class Runner { | |||
if (!rules) { | |||
throw new Error('Please provide the path to the rules file'); | |||
} | |||
console.log('Rules file path: ', rules); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to use logging class
message: responseData.choices[0].message.content, | ||
}; | ||
} catch (error) { | ||
console.error('Error generating chat response:', error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logging class
)) as unknown as AxiosResponse; | ||
return { success: true, message: response.data.choices[0].text }; | ||
} catch (error) { | ||
console.error('Error generating chat response: ', error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logging class
window.showErrorMessage('⛏️ Credential Digger: ' + error.message); | ||
return; | ||
} else { | ||
console.error('Error: ', error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logging class
*/ | ||
export function handleError(error: unknown): void { | ||
if (error instanceof Error) { | ||
console.error('Error: ', error.message); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logging class
try { | ||
const extension = extname(uri.fsPath); | ||
this.aiPromptsAndDocs = await loadJsonData( | ||
'../src/lib/code-actions/aiPromptsAndDocs.json', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to build the path
|
||
return response; | ||
} catch (error) { | ||
console.error('Error generating chat response:', error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logging class
}; | ||
|
||
const response: AxiosResponse<ChatResponse> = await axios.post( | ||
'https://api.openai.com/v1/chat/completions', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extract in a config file to prevent adjusting the code in case of url change
No description provided.