refactor(server): config system (#11081)

This commit is contained in:
forehalo
2025-03-27 12:32:28 +00:00
parent 7091111f85
commit 0ea38680fa
274 changed files with 7583 additions and 5841 deletions
@@ -25,9 +25,7 @@ export class CopilotStorage {
private readonly storageFactory: StorageProviderFactory,
private readonly quota: QuotaService
) {
this.provider = this.storageFactory.create(
this.config.plugins.copilot.storage
);
this.provider = this.storageFactory.create(this.config.copilot.storage);
}
@CallMetric('ai', 'blob_put')
@@ -39,7 +37,7 @@ export class CopilotStorage {
) {
const name = `${userId}/${workspaceId}/${key}`;
await this.provider.put(name, blob);
if (this.config.node.dev || this.config.node.test) {
if (!env.prod) {
// return image base64url for dev environment
return `data:image/png;base64,${blob.toString('base64')}`;
}