fix(codex-migrate): use String#replace in display name · openclaw/openclaw@49adf20
sjf
·
2026-05-14
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -116,9 +116,7 @@ export function formatMigrationResult(plan: MigrationPlan): string[] {
|
116 | 116 | } |
117 | 117 | |
118 | 118 | function formatItemDisplayName(item: MigrationItem): string { |
119 | | -const colonIndex = item.id.indexOf(":"); |
120 | | -const withoutPrefix = colonIndex >= 0 ? item.id.slice(colonIndex + 1) : item.id; |
121 | | -return withoutPrefix.replace(/:\d+$/, ""); |
| 119 | +return item.id.replace(/^[^:]+:/, "").replace(/:\d+$/, ""); |
122 | 120 | } |
123 | 121 | |
124 | 122 | const REASON_CODE_MESSAGES: Record<string, string> = { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。