Skip to content
Open
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
14 changes: 7 additions & 7 deletions src/activate/registerCommands.ts
Copy link
Copy Markdown
Contributor

@edelauna edelauna May 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for looking into this!. since we're touching this file can we also add specs to make codecov happy?

Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ const getCommandsMap = ({ context, outputChannel, provider }: RegisterCommandOpt

TelemetryService.instance.captureTitleButtonClicked("settings")

visibleProvider.postMessageToWebview({ type: "action", action: "settingsButtonClicked" })
void visibleProvider.postMessageToWebview({ type: "action", action: "settingsButtonClicked" })
// Also explicitly post the visibility message to trigger scroll reliably
visibleProvider.postMessageToWebview({ type: "action", action: "didBecomeVisible" })
void visibleProvider.postMessageToWebview({ type: "action", action: "didBecomeVisible" })
},
historyButtonClicked: () => {
const visibleProvider = getVisibleProviderOrLog(outputChannel)
Expand All @@ -116,12 +116,12 @@ const getCommandsMap = ({ context, outputChannel, provider }: RegisterCommandOpt

TelemetryService.instance.captureTitleButtonClicked("history")

visibleProvider.postMessageToWebview({ type: "action", action: "historyButtonClicked" })
void visibleProvider.postMessageToWebview({ type: "action", action: "historyButtonClicked" })
},
marketplaceButtonClicked: () => {
const visibleProvider = getVisibleProviderOrLog(outputChannel)
if (!visibleProvider) return
visibleProvider.postMessageToWebview({ type: "action", action: "marketplaceButtonClicked" })
void visibleProvider.postMessageToWebview({ type: "action", action: "marketplaceButtonClicked" })
},
newTask: handleNewTask,
setCustomStoragePath: async () => {
Expand Down Expand Up @@ -150,7 +150,7 @@ const getCommandsMap = ({ context, outputChannel, provider }: RegisterCommandOpt

// Send focus input message only for sidebar panels
if (sidebarPanel && getPanel() === sidebarPanel) {
provider.postMessageToWebview({ type: "action", action: "focusInput" })
await provider.postMessageToWebview({ type: "action", action: "focusInput" })
}
} catch (error) {
outputChannel.appendLine(`Error focusing input: ${error}`)
Expand All @@ -170,7 +170,7 @@ const getCommandsMap = ({ context, outputChannel, provider }: RegisterCommandOpt
return
}

visibleProvider.postMessageToWebview({ type: "acceptInput" })
void visibleProvider.postMessageToWebview({ type: "acceptInput" })
},
toggleAutoApprove: async () => {
const visibleProvider = getVisibleProviderOrLog(outputChannel)
Expand All @@ -179,7 +179,7 @@ const getCommandsMap = ({ context, outputChannel, provider }: RegisterCommandOpt
return
}

visibleProvider.postMessageToWebview({
await visibleProvider.postMessageToWebview({
type: "action",
action: "toggleAutoApprove",
})
Expand Down
14 changes: 14 additions & 0 deletions src/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,20 @@ export default [
"no-undef": "off",
},
},
{
// Ratchet: enforce no-floating-promises directory by directory. Each
// directory is added here once its floating promises are resolved.
files: ["activate/**/*.ts"],
languageOptions: {
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname,
},
},
rules: {
"@typescript-eslint/no-floating-promises": "error",
},
},
{
ignores: ["webview-ui", "out"],
},
Expand Down
Loading