Lukas
August 15, 2025, 11:49am
1
Bug report
When removing a command listener using the returned disposable the command listener gets removed but the command (without any listener) is still being shown in telescope search results.
Environment
Platform: Windows
Platform version: 11
App Version: 6.0.0-canary.2
How to reproduce
const disposable = inkdrop.commands.add(document.body, 'custom:test-command', () => console.log('Custom command executed'));
disposable.dispose();
craftzdog
(Takuya Matsuyama)
August 18, 2025, 7:43am
2
Hi Lukas,
Thanks for the report.
The Telescope command source caches commands for 1 minute.
Can you try waiting until the cache gets updated?
Lukas
August 18, 2025, 5:12pm
3
Oh, i wasn’t aware of that.
I retried and it still finds the disposed command using telescope
I waited 2 minutes before searching
const disposable = inkdrop.commands.add(document.body, 'custom:test-command', () => console.log('Custom command executed'));
disposable.dispose();
await setTimeout(() => console.log("Time is up"), 120000);
I added a timer to make sure that I waited long enough. I cut out the waiting from the video.
1 Like
craftzdog
(Takuya Matsuyama)
August 21, 2025, 3:19am
4
gotcha, it will be fixed in canary.3!
1 Like
craftzdog
(Takuya Matsuyama)
August 25, 2025, 6:57am
5
1 Like