Skip to content
Draft
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
4 changes: 2 additions & 2 deletions packages/core/src/ide/ide-installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ class VsCodeInstaller implements IdeInstaller {
['--install-extension', vsixPath, '--force'],
{
stdio: 'pipe',
shell: os.platform() === 'win32' && commandPath.endsWith('.cmd')
}
shell: os.platform() === 'win32' && commandPath.endsWith('.cmd'),
},
);
return {
success: true,
Expand Down
5 changes: 2 additions & 3 deletions packages/core/src/tools/web-fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,8 @@ ${textContent}
llmContent: resultText,
returnDisplay: `Content for ${url} processed using fallback fetch.`,
};
} catch (e) {
const error = e as Error;
const errorMessage = `Error during fallback fetch for ${url}: ${error.message}`;
} catch (error: unknown) {
const errorMessage = `Error during fallback fetch for ${url}: ${getErrorMessage(error)}`;
return {
llmContent: `Error: ${errorMessage}`,
returnDisplay: `Error: ${errorMessage}`,
Expand Down
3 changes: 2 additions & 1 deletion packages/core/src/utils/fetch.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ describe('fetchWithTimeout', () => {
it('should throw FetchError with ETIMEDOUT code when request times out', async () => {
// Mock fetch to simulate timeout behavior
(fetch as unknown as ReturnType<typeof vi.fn>).mockImplementation(
(url: string, options: { signal: AbortSignal }) => new Promise((_, reject) => {
(url: string, options: { signal: AbortSignal }) =>
new Promise((_, reject) => {
if (options.signal.aborted) {
const error = new Error('The operation was aborted');
(error as any).code = 'ABORT_ERR';
Expand Down