mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-27 16:04:21 +00:00
feat: improvements for installed plugin card
* feat:Add README display to installed plugins * chore: Increase the timeout of call_tool * perf: smaller animation * fix: add endpiont for readme * feat: supports for multilingual READMEs * feat: supports for getting readme img * chore: bump langbot-plugin to 0.1.13b1 * perf: plugin card layout * fix: import useTranslation linter error --------- Co-authored-by: Junyan Qin <rockchinq@gmail.com>
This commit is contained in:
@@ -483,6 +483,27 @@ export class BackendClient extends BaseHttpClient {
|
||||
return this.delete(`/api/v1/plugins/config-files/${fileKey}`);
|
||||
}
|
||||
|
||||
public getPluginReadme(
|
||||
author: string,
|
||||
name: string,
|
||||
language: string = 'en',
|
||||
): Promise<{ readme: string }> {
|
||||
return this.get(
|
||||
`/api/v1/plugins/${author}/${name}/readme?language=${language}`,
|
||||
);
|
||||
}
|
||||
|
||||
public getPluginAssetURL(
|
||||
author: string,
|
||||
name: string,
|
||||
filepath: string,
|
||||
): string {
|
||||
return (
|
||||
this.instance.defaults.baseURL +
|
||||
`/api/v1/plugins/${author}/${name}/assets/${filepath}`
|
||||
);
|
||||
}
|
||||
|
||||
public getPluginIconURL(author: string, name: string): string {
|
||||
if (this.instance.defaults.baseURL === '/') {
|
||||
const url = window.location.href;
|
||||
|
||||
Reference in New Issue
Block a user