(entry: TranscriptEntry)
| 313 | } |
| 314 | |
| 315 | function formatUndoChoiceInput(entry: TranscriptEntry): string { |
| 316 | if (entry.kind === 'skill_activation') { |
| 317 | const name = singleLine( |
| 318 | entry.skillName ?? entry.content.replace(/^Activated skill:\s*/, ''), |
| 319 | ); |
| 320 | const args = singleLine(entry.skillArgs ?? ''); |
| 321 | if (name.length === 0) return ''; |
| 322 | return args.length > 0 ? `/${name} ${args}` : `/${name}`; |
| 323 | } |
| 324 | if (entry.kind === 'plugin_command' && entry.pluginCommandData !== undefined) { |
| 325 | return formatPluginCommandSlash(entry.pluginCommandData) ?? entry.content; |
| 326 | } |
| 327 | return entry.content; |
| 328 | } |
| 329 | |
| 330 | function formatPluginCommandSlash(data: NonNullable<TranscriptEntry['pluginCommandData']>): string | undefined { |
| 331 | const name = `${data.pluginId}:${data.commandName}`; |
no test coverage detected