feat: 完善账号管理与扩展体验
CI / config (push) Canceled after 0s
CI / test-frontend (push) Canceled after 0s
CI / test-rust (push) Canceled after 0s
CI / test-e2e (push) Canceled after 0s
CI / test-e2e-release (push) Canceled after 0s
CI / build (push) Canceled after 0s
CI / release (push) Canceled after 0s
CI / docker (push) Canceled after 0s
CI / docker-website (push) Canceled after 0s

补齐普通用户自助账号、中文设置与快捷键提示,修复大型扩展安装和移动端弹窗,并按服务器能力限制不兼容扩展。

Co-Authored-By: Codex <noreply@anthropic.com>
This commit is contained in:
2026-08-12 22:13:23 +08:00
co-authored by Codex
parent 679bf134e7
commit db73584e2b
43 changed files with 1090 additions and 114 deletions
+16
View File
@@ -153,6 +153,11 @@ export function readFile(name: string): Promise<Uint8Array> {
return syscall("space.readFile", name);
}
/** Read a file as Base64 without transferring binary data across a plug worker. */
export function readFileBase64(name: string): Promise<string> {
return syscall("space.readFileBase64", name);
}
/**
* Reads a reference (e.g. page#header or page@20) and returns it as a string
*/
@@ -192,6 +197,17 @@ export function writeFile(name: string, data: Uint8Array): Promise<FileMeta> {
return syscall("space.writeFile", name, data);
}
/**
* Write a Base64-encoded file to the space. This avoids browser-specific
* TypedArray serialization issues at the plug worker boundary.
*/
export function writeFileBase64(
name: string,
base64Data: string,
): Promise<FileMeta> {
return syscall("space.writeFileBase64", name, base64Data);
}
/**
* Delete a file from the space.
* @param name the name of the file to delete
+10
View File
@@ -101,6 +101,16 @@ export function getVersion(): Promise<string> {
return syscall("system.getVersion");
}
export type SystemCapabilities = {
shell: boolean;
runtimeApi: boolean;
};
/** Returns optional server capabilities available to the current space. */
export function getCapabilities(): Promise<SystemCapabilities> {
return syscall("system.getCapabilities");
}
export function getConfig<T = any>(
key: string,
defaultValue: any = undefined,