fix: populate team color/displayName in tool approval from config.json
syntheticRequest for team launch was missing color and displayName fields — they only existed in TeamCreateRequest (create flow). Now reads color and name from config.json when building syntheticRequest, so ToolApprovalRequest always has team color.
This commit is contained in:
parent
6d77e77200
commit
ab2c40d358
1 changed files with 13 additions and 0 deletions
|
|
@ -3231,6 +3231,19 @@ export class TeamProvisioningService {
|
||||||
skipPermissions: request.skipPermissions,
|
skipPermissions: request.skipPermissions,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Enrich with color/displayName from config.json (always available for launched teams)
|
||||||
|
try {
|
||||||
|
const cfg = JSON.parse(configRaw) as Record<string, unknown>;
|
||||||
|
if (typeof cfg.color === 'string' && cfg.color.trim().length > 0) {
|
||||||
|
syntheticRequest.color = cfg.color.trim();
|
||||||
|
}
|
||||||
|
if (typeof cfg.name === 'string' && cfg.name.trim().length > 0) {
|
||||||
|
syntheticRequest.displayName = cfg.name.trim();
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
// config already validated above — ignore parse errors here
|
||||||
|
}
|
||||||
|
|
||||||
const run: ProvisioningRun = {
|
const run: ProvisioningRun = {
|
||||||
runId,
|
runId,
|
||||||
teamName: request.teamName,
|
teamName: request.teamName,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue