mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-09-30 15:16:38 +08:00
- Refactored audio handling by separating concerns into AudioAnalyzer and AudioPlayback classes. - Improved type definitions for Tauri commands and dialog interfaces in global.d.ts. - Added new CodeActions and CodePreview components to enhance code display and interaction in markdown.tsx. - Updated state management in sd.ts to include drawing functionality. - Cleaned up global styles in globals.scss, reducing complexity and improving maintainability.
44 lines
1.0 KiB
TypeScript
44 lines
1.0 KiB
TypeScript
declare module "*.jpg";
|
|
declare module "*.png";
|
|
declare module "*.woff2";
|
|
declare module "*.woff";
|
|
declare module "*.ttf";
|
|
declare module "*.scss" {
|
|
const content: Record<string, string>;
|
|
export default content;
|
|
}
|
|
|
|
declare module "*.svg";
|
|
|
|
// Add more specific types
|
|
interface TauriCommands {
|
|
writeText(text: string): Promise<void>;
|
|
invoke(command: string, payload?: Record<string, unknown>): Promise<any>;
|
|
}
|
|
|
|
interface TauriDialog {
|
|
save(options?: Record<string, unknown>): Promise<string | null>;
|
|
}
|
|
|
|
interface TauriFS {
|
|
writeBinaryFile(path: string, data: Uint8Array): Promise<void>;
|
|
writeTextFile(path: string, data: string): Promise<void>;
|
|
}
|
|
|
|
interface TauriNotification {
|
|
requestPermission(): Promise<Permission>;
|
|
isPermissionGranted(): Promise<boolean>;
|
|
sendNotification(options: string | Options): void;
|
|
}
|
|
|
|
declare global {
|
|
interface Window {
|
|
__TAURI__?: {
|
|
dialog: TauriDialog;
|
|
fs: TauriFS;
|
|
notification: TauriNotification;
|
|
// ... other Tauri interfaces
|
|
};
|
|
}
|
|
}
|