Skip to content

Instantly share code, notes, and snippets.

@Olian04
Created December 12, 2022 07:42
Show Gist options
  • Save Olian04/62510731663c7a038b32a07b02a4a5a6 to your computer and use it in GitHub Desktop.
Save Olian04/62510731663c7a038b32a07b02a4a5a6 to your computer and use it in GitHub Desktop.
test-command
import type { Prompt, Page, Browser } from 'arbitrary-command-palette/types';
export async function(
prompt: Prompt,
page: Page,
browser: Browser,
) {
prompt.thinking();
const catResp = await fetch('https://cataas.com/cat');
const imgURL = URL.createObjectURL(catResp.blob());
await prompt.show(`<img src="${imgURL}">`);
prompt.done();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment