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 * Agents page functionality
*/ */
import { createChoices, getChoicesValues, type Choices } from '../choices'; 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 { fetchData, debounce, escapeHtml, getGitHubUrl, getInstallDropdownHtml, setupDropdownCloseHandlers, getActionButtonsHtml, setupActionHandlers } from '../utils';
import { setupModal, openFileModal } from '../modal'; import { setupModal, openFileModal } from '../modal';
interface Agent { interface Agent extends SearchItem {
title: string;
description?: string;
path: string; path: string;
model?: string; model?: string;
tools?: string[]; tools?: string[];

View File

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

View File

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

View File

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

View File

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