(value: string)
| 324 | }; |
| 325 | } |
| 326 | function extractCommandNameAndArgs(value: string): { |
| 327 | commandName: string; |
| 328 | args: string; |
| 329 | } | null { |
| 330 | if (isCommandInput(value)) { |
| 331 | const spaceIndex = value.indexOf(' '); |
| 332 | if (spaceIndex === -1) return { |
| 333 | commandName: value.slice(1), |
| 334 | args: '' |
| 335 | }; |
| 336 | return { |
| 337 | commandName: value.slice(1, spaceIndex), |
| 338 | args: value.slice(spaceIndex + 1) |
| 339 | }; |
| 340 | } |
| 341 | return null; |
| 342 | } |
| 343 | function hasCommandWithArguments(isAtEndWithWhitespace: boolean, value: string) { |
| 344 | // If value.endsWith(' ') but the user is not at the end, then the user has |
| 345 | // potentially gone back to the command in an effort to edit the command name |
no test coverage detected