Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

fix(profile): resolve exactOptionalPropertyTypes type error in updateStyle

Jiang Bohana7f1c56e0945
diff --git a/src/agent/profile/index.ts b/src/agent/profile/index.ts
index 54e0b0f727..cf7423e08c 100644
--- a/src/agent/profile/index.ts
+++ b/src/agent/profile/index.ts
@@ -292,10 +292,10 @@ export class ProfileManager {
updateStyle(style: string): void {
const profile = this.getOrCreateProfile(false);
const currentConfig = profile.config ?? {};
- const newConfig: ProfileConfig = {
- ...currentConfig,
+ // Use Object.assign to avoid exactOptionalPropertyTypes issues with spread
+ const newConfig: ProfileConfig = Object.assign({}, currentConfig, {
style: style as ProfileConfig["style"],
- };
+ });
profile.config = newConfig;
this.profile = profile;
writeProfileConfig(this.profileId, newConfig, { baseDir: this.baseDir });