Search Wikipedia articles

This script prompts the user for a search query and then returns the first 20 results from Wikipedia. It is buggy though, and I am an amateur dev so please be gentle. Help is needed to display the thumbnails in the preview section. Please don't hesitate to provide any feedback..

// Name: Search for Wikipedia articles
// Description: Prompts for a search string and lists articles from Wikipedia
// Author: Positron
// Shortcut:
import "@johnlindquist/kit"
let searchQuery = await arg("Enter a search query: ");
const url = `${searchQuery}`;
const result = await get(url);
let articleId = await arg("Please choose an article: ", Object.keys(
(id) => ({
description: `${[id].title}`,
preview: () => `