(raw: string)
| 1085 | for (const part of parts) { |
| 1086 | const key = /^-?\d+$/.test(part) |
| 1087 | ? String(Number(part)) |
| 1088 | : part.replace(/^@/, "").toLowerCase(); |
| 1089 | if (!deduped.has(key)) { |
| 1090 | deduped.set(key, part); |
| 1091 | } |
| 1092 | } |
| 1093 | |
| 1094 | return Array.from(deduped.values()); |
| 1095 | } |
| 1096 | |
| 1097 | function parseSeatActionArgs(remainder: string): { |
| 1098 | identifiers: string[]; |
| 1099 | targetArg?: string; |
| 1100 | } { |
| 1101 | const tokens = remainder.trim().split(/\s+/).filter(Boolean); |
| 1102 | const identifiers = parseUserIdentifiers(remainder); |
| 1103 | if (identifiers) { |
| 1104 | return { identifiers }; |
| 1105 | } |
| 1106 | |
| 1107 | if (tokens.length > 1) { |
| 1108 | const targetArg = tokens[tokens.length - 1]; |
| 1109 | const targetlessIdentifiers = parseUserIdentifiers( |
| 1110 | tokens.slice(0, -1).join(" "), |
no test coverage detected