feat: add nick name to sub-agents (#12320)

Adding random nick name to sub-agents. Used for UX

At the same time, also storing and wiring the role of the sub-agent
This commit is contained in:
jif-oai
2026-02-20 14:39:49 +00:00
committed by GitHub
parent 03ff04cd65
commit 0f9eed3a6f
39 changed files with 1125 additions and 109 deletions

View File

@@ -211,6 +211,8 @@ SELECT
created_at,
updated_at,
source,
agent_nickname,
agent_role,
model_provider,
cwd,
cli_version,
@@ -310,6 +312,8 @@ SELECT
created_at,
updated_at,
source,
agent_nickname,
agent_role,
model_provider,
cwd,
cli_version,
@@ -691,6 +695,8 @@ INSERT INTO threads (
created_at,
updated_at,
source,
agent_nickname,
agent_role,
model_provider,
cwd,
cli_version,
@@ -704,12 +710,14 @@ INSERT INTO threads (
git_sha,
git_branch,
git_origin_url
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
ON CONFLICT(id) DO UPDATE SET
rollout_path = excluded.rollout_path,
created_at = excluded.created_at,
updated_at = excluded.updated_at,
source = excluded.source,
agent_nickname = excluded.agent_nickname,
agent_role = excluded.agent_role,
model_provider = excluded.model_provider,
cwd = excluded.cwd,
cli_version = excluded.cli_version,
@@ -730,6 +738,8 @@ ON CONFLICT(id) DO UPDATE SET
.bind(datetime_to_epoch_seconds(metadata.created_at))
.bind(datetime_to_epoch_seconds(metadata.updated_at))
.bind(metadata.source.as_str())
.bind(metadata.agent_nickname.as_deref())
.bind(metadata.agent_role.as_deref())
.bind(metadata.model_provider.as_str())
.bind(metadata.cwd.display().to_string())
.bind(metadata.cli_version.as_str())
@@ -3092,6 +3102,8 @@ VALUES (?, ?, ?, ?, ?)
created_at: now,
updated_at: now,
source: "cli".to_string(),
agent_nickname: None,
agent_role: None,
model_provider: "test-provider".to_string(),
cwd,
cli_version: "0.0.0".to_string(),