mirror of
https://github.com/github/awesome-copilot.git
synced 2026-02-23 20:05:12 +00:00
Some more ts updates
This commit is contained in:
@@ -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[];
|
||||||
|
|||||||
@@ -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()
|
||||||
|
|||||||
@@ -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[];
|
||||||
|
|||||||
@@ -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[];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user