mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-17 05:45:51 +00:00
feat(remote-control): 优化 Web 展示、状态同步与桥接控制流程 (#288)
Co-authored-by: chengzifeng <chengzifeng@meituan.com>
This commit is contained in:
@@ -535,13 +535,14 @@ export function getCommandsByMaxPriority(
|
||||
* Returns true if the command is a slash command that should be routed through
|
||||
* processSlashCommand rather than sent to the model as text.
|
||||
*
|
||||
* Commands with `skipSlashCommands` (e.g. bridge/CCR messages) are NOT treated
|
||||
* as slash commands — their text is meant for the model.
|
||||
* Commands with `skipSlashCommands` are usually treated as plain text, except
|
||||
* Remote Control bridge messages (`bridgeOrigin`) that are re-validated later
|
||||
* through isBridgeSafeCommand().
|
||||
*/
|
||||
export function isSlashCommand(cmd: QueuedCommand): boolean {
|
||||
return (
|
||||
typeof cmd.value === 'string' &&
|
||||
cmd.value.trim().startsWith('/') &&
|
||||
!cmd.skipSlashCommands
|
||||
(!cmd.skipSlashCommands || cmd.bridgeOrigin === true)
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user