增加滚动条

This commit is contained in:
2025-10-11 01:24:31 +08:00
parent fed1e63c34
commit 1de00d9c4f
5 changed files with 213 additions and 51 deletions

View File

@@ -2698,6 +2698,32 @@ export const api = {
console.error("Failed to cleanup terminal sessions:", error);
throw error;
}
},
/**
* Get all model mappings
* @author yovinchen
*/
async getModelMappings(): Promise<ModelMapping[]> {
try {
return await invoke<ModelMapping[]>("get_model_mappings");
} catch (error) {
console.error("Failed to get model mappings:", error);
throw error;
}
},
/**
* Update a model mapping
* @author yovinchen
*/
async updateModelMapping(alias: string, modelName: string): Promise<void> {
try {
await invoke("update_model_mapping", { alias, modelName });
} catch (error) {
console.error("Failed to update model mapping:", error);
throw error;
}
}
};
@@ -2815,3 +2841,13 @@ export const ccrApi = {
}
}
};
/**
* Model mapping structure
* @author yovinchen
*/
export interface ModelMapping {
alias: string;
model_name: string;
updated_at: string;
}