Some more ts updates

This commit is contained in:
Aaron Powell
2026-01-29 10:26:03 +11:00
parent d46210b2de
commit 82accb2cd6
5 changed files with 11 additions and 21 deletions

View File

@@ -2,13 +2,11 @@
* Agents page functionality
*/
import { createChoices, getChoicesValues, type Choices } from '../choices';
import { FuzzySearch } from '../search';
import { FuzzySearch, SearchItem } from '../search';
import { fetchData, debounce, escapeHtml, getGitHubUrl, getInstallDropdownHtml, setupDropdownCloseHandlers, getActionButtonsHtml, setupActionHandlers } from '../utils';
import { setupModal, openFileModal } from '../modal';
interface Agent {
title: string;
description?: string;
interface Agent extends SearchItem {
path: string;
model?: string;
tools?: string[];

View File

@@ -2,15 +2,13 @@
* Collections page functionality
*/
import { createChoices, getChoicesValues, type Choices } from '../choices';
import { FuzzySearch } from '../search';
import { FuzzySearch, SearchItem } from '../search';
import { fetchData, debounce, escapeHtml, getGitHubUrl } from '../utils';
import { setupModal, openFileModal } from '../modal';
interface Collection {
interface Collection extends SearchItem {
id: string;
name: string;
title: string;
description?: string;
path: string;
tags?: string[];
featured?: boolean;
@@ -108,7 +106,7 @@ export async function initCollectionsPage(): Promise<void> {
allItems = data.items;
// Map collection items to search items
const searchItems: SearchItem[] = allItems.map(item => ({
const searchItems = allItems.map(item => ({
...item,
title: item.name,
searchText: `${item.name} ${item.description} ${item.tags?.join(' ') || ''}`.toLowerCase()

View File

@@ -2,13 +2,11 @@
* Instructions page functionality
*/
import { createChoices, getChoicesValues, type Choices } from '../choices';
import { FuzzySearch } from '../search';
import { FuzzySearch, SearchItem } from '../search';
import { fetchData, debounce, escapeHtml, getGitHubUrl, getInstallDropdownHtml, setupDropdownCloseHandlers, getActionButtonsHtml, setupActionHandlers } from '../utils';
import { setupModal, openFileModal } from '../modal';
interface Instruction {
title: string;
description?: string;
interface Instruction extends SearchItem {
path: string;
applyTo?: string;
extensions?: string[];

View File

@@ -2,13 +2,11 @@
* Prompts page functionality
*/
import { createChoices, getChoicesValues, type Choices } from '../choices';
import { FuzzySearch } from '../search';
import { FuzzySearch, SearchItem } from '../search';
import { fetchData, debounce, escapeHtml, getGitHubUrl, getInstallDropdownHtml, setupDropdownCloseHandlers, getActionButtonsHtml, setupActionHandlers } from '../utils';
import { setupModal, openFileModal } from '../modal';
interface Prompt {
title: string;
description?: string;
interface Prompt extends SearchItem {
path: string;
tools?: string[];
}

View File

@@ -2,7 +2,7 @@
* Skills page functionality
*/
import { createChoices, getChoicesValues, type Choices } from '../choices';
import { FuzzySearch } from '../search';
import { FuzzySearch, SearchItem } from '../search';
import { fetchData, debounce, escapeHtml, getGitHubUrl, getRawGitHubUrl } from '../utils';
import { setupModal, openFileModal } from '../modal';
import JSZip from '../jszip';
@@ -12,10 +12,8 @@ interface SkillFile {
path: string;
}
interface Skill {
interface Skill extends SearchItem {
id: string;
title: string;
description?: string;
path: string;
skillFile: string;
category: string;