fix: types

This commit is contained in:
tomasz-io 2025-03-11 08:39:04 -07:00
parent dfd4628680
commit 41a79166aa
2 changed files with 15 additions and 19 deletions

View file

@ -1002,26 +1002,22 @@ export class Core {
return { url };
});
on(
"didChangeActiveTextEditor",
async ({ data: { filepath, filename } }) => {
this.messenger.send("didChangeActiveTextEditor", {
filepath,
filename,
});
on("didChangeActiveTextEditor", async ({ data: { filepath } }) => {
this.messenger.send("didChangeActiveTextEditor", {
filepath,
});
try {
const ignore = shouldIgnore(filepath, this.ide);
if (!ignore) {
recentlyEditedFilesCache.set(filepath, filepath);
}
} catch (e) {
console.error(
`didChangeActiveTextEditor: failed to update recentlyEditedFiles cache for ${filepath}`,
);
try {
const ignore = shouldIgnore(filepath, this.ide);
if (!ignore) {
recentlyEditedFilesCache.set(filepath, filepath);
}
},
);
} catch (e) {
console.error(
`didChangeActiveTextEditor: failed to update recentlyEditedFiles cache for ${filepath}`,
);
}
});
on("tools/call", async ({ data: { toolCall, selectedModelTitle } }) => {
const { config } = await this.configHandler.loadConfig();

View file

@ -26,7 +26,7 @@ export type ToWebviewFromIdeOrCoreProtocol = {
},
void,
];
didChangeActiveTextEditor: [{ filepath: string; filename: string }, void];
didChangeActiveTextEditor: [{ filepath: string }, void];
isContinueInputFocused: [undefined, boolean];
addContextItem: [
{