fix: normalize iOS unicode dashes in slash command args
iOS auto-corrects -- to — (em dash) and - to – (en dash), causing commands like /model glm-4.7 —provider zai to fail with 'Model names cannot contain spaces'. Normalize at get_command_args().
This commit is contained in:
parent
e25c319fa3
commit
2f48c58b85
@ -752,7 +752,10 @@ class MessageEvent:
|
|||||||
if not self.is_command():
|
if not self.is_command():
|
||||||
return self.text
|
return self.text
|
||||||
parts = self.text.split(maxsplit=1)
|
parts = self.text.split(maxsplit=1)
|
||||||
return parts[1] if len(parts) > 1 else ""
|
args = parts[1] if len(parts) > 1 else ""
|
||||||
|
# iOS auto-corrects -- to — (em dash) and - to – (en dash)
|
||||||
|
args = args.replace("\u2014\u2014", "--").replace("\u2014", "--").replace("\u2013", "-")
|
||||||
|
return args
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user