feat(agent): add profile name and user content management

Add methods to ProfileManager, Agent, and AsyncAgent for:
- Getting/setting agent display name (stored in config.json)
- Getting/setting user.md content

This enables the desktop app to manage agent settings.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Jiang Bohan 2026-02-04 03:12:12 +08:00
parent e9ed53b615
commit a80c858ce5
4 changed files with 95 additions and 0 deletions

View file

@ -148,4 +148,32 @@ export class AsyncAgent {
getProfileId(): string | undefined {
return this.agent.getProfileId();
}
/**
* Get agent display name from profile config.
*/
getAgentName(): string | undefined {
return this.agent.getAgentName();
}
/**
* Update agent display name in profile config.
*/
setAgentName(name: string): void {
this.agent.setAgentName(name);
}
/**
* Get user.md content from profile.
*/
getUserContent(): string | undefined {
return this.agent.getUserContent();
}
/**
* Update user.md content in profile.
*/
setUserContent(content: string): void {
this.agent.setUserContent(content);
}
}