feat: migrate to DSH 0.1.5-rc.2 with TypeScript refactor, official slot footer and codex selector

This commit is contained in:
2026-09-11 13:58:29 +08:00
parent 4401e9cea7
commit fa098b5192
27 changed files with 4976 additions and 6727 deletions
+23
View File
@@ -0,0 +1,23 @@
import React from 'react';
export interface CodexModelSelectProps {
directory: {
subscribe: (listener: () => void) => () => void;
getSnapshot: () => any;
};
load: () => void;
select: (selection: {
provider: string;
model: string;
reasoningEffort?: string;
}) => Promise<boolean>;
available: boolean;
locked?: boolean;
}
export declare function CodexModelSelect(props: CodexModelSelectProps): React.DetailedReactHTMLElement<{
ref: React.RefObject<HTMLDivElement>;
style: {
position: "relative";
display: "inline-flex";
alignItems: "center";
};
}, HTMLDivElement>;
+7
View File
@@ -0,0 +1,7 @@
import React from 'react';
export interface ModelsFooterSettingsProps {
ctx: any;
}
export declare function ModelsFooterSettings({ ctx }: ModelsFooterSettingsProps): React.DetailedReactHTMLElement<{
className: string;
}, HTMLElement>;
+28
View File
@@ -0,0 +1,28 @@
import React from 'react';
export interface ProviderCardExtrasProps {
provider: {
provider: string;
displayName: string;
settingsNs: string;
settingsPath: readonly string[];
active: boolean;
declared?: boolean;
error?: string;
};
configured: boolean;
keyConfigured: boolean;
ctx: any;
}
export declare function ProviderCardExtras({ provider, configured, keyConfigured, ctx }: ProviderCardExtrasProps): React.DetailedReactHTMLElement<{
style: {
padding: string;
marginTop: string;
background: string;
borderRadius: string;
border: string;
display: "flex";
alignItems: "center";
justifyContent: "space-between";
gap: string;
};
}, HTMLElement>;
+9
View File
@@ -0,0 +1,9 @@
export interface TranslationMap {
[key: string]: string;
}
export declare const I18N_DICT: {
zh: TranslationMap;
en: TranslationMap;
};
export declare function isZhLocale(): boolean;
export declare function getTranslation(key: string, isZh?: boolean, params?: Record<string, any>): string;
+3
View File
@@ -0,0 +1,3 @@
export declare const name = "dsh-plugin-model-enhancer";
export declare const inject: string[];
export declare function apply(ctx: any): void;
+25
View File
@@ -0,0 +1,25 @@
export interface DevModelInfo {
providerKey: string;
providerName: string;
id: string;
rawKey: string;
name?: string;
limit?: {
context?: number;
output?: number;
};
modalities?: {
input?: string[];
output?: string[];
};
reasoning?: boolean;
reasoning_options?: Array<{
type?: string;
values?: string[];
}>;
[key: string]: any;
}
export declare const THINKING_LEVELS_ALL: string[];
export declare function fetchAllModelsDev(): Promise<DevModelInfo[]>;
export declare function normModelKey(key: string): string;
export declare function findDevModel(queryId: string, allList: DevModelInfo[]): DevModelInfo | null;
+11
View File
File diff suppressed because one or more lines are too long
+4
View File
@@ -0,0 +1,4 @@
export declare const name = "dsh-plugin-model-enhancer";
export declare const inject: string[];
export declare function getModelsDevData(): Promise<any>;
export declare function apply(ctx: any): void;