Merge model selection pending state from master
This commit is contained in:
commit
8cfb9d4a67
321 files changed
+4127
-3994
No files matched your search
@@ -25,8 +25,8 @@
|
||||
- text: 代码工作工具 开启后显示轨迹、本轮代码差异,新对话中的 Agent 预设切换
|
||||
- switch "代码工作工具" [checked]
|
||||
- text: 快捷键
|
||||
- paragraph: 查看当前可用的快捷键和输入操作
|
||||
- button "查看快捷键"
|
||||
- paragraph: 查看和编辑当前可用的快捷键和输入操作
|
||||
- button "编辑快捷键"
|
||||
- text: 繁忙时的发送行为 智能体运行时 Enter 键和发送按钮的行为;Cmd/Ctrl+Enter 使用另一行为
|
||||
- button "排队发送"
|
||||
- text: 当前版本:{{version}}
|
||||
@@ -25,8 +25,8 @@
|
||||
- text: Coding Tools Shows trajectory, code diffs, and Agent preset switching in new chats
|
||||
- switch "Coding Tools" [checked]
|
||||
- text: Keyboard shortcuts
|
||||
- paragraph: Browse available shortcuts and input actions
|
||||
- button "View shortcuts"
|
||||
- paragraph: View and edit available shortcuts and input actions
|
||||
- button "Edit shortcuts"
|
||||
- text: Send behavior while busy What Enter and the Send button do while the agent is running; Cmd/Ctrl+Enter uses the other behavior
|
||||
- button "Queue"
|
||||
- text: "Current version: {{version}}"
|
||||
@@ -25,8 +25,8 @@
|
||||
- text: Coding Tools Shows trajectory, code diffs, and Agent preset switching in new chats
|
||||
- switch "Coding Tools"
|
||||
- text: Keyboard shortcuts
|
||||
- paragraph: Browse available shortcuts and input actions
|
||||
- button "View shortcuts"
|
||||
- paragraph: View and edit available shortcuts and input actions
|
||||
- button "Edit shortcuts"
|
||||
- text: Send behavior while busy What Enter and the Send button do while the agent is running; Cmd/Ctrl+Enter uses the other behavior
|
||||
- button "Queue"
|
||||
- text: "Current version: {{version}}"
|
||||
@@ -25,8 +25,8 @@
|
||||
- text: Coding Tools Shows trajectory, code diffs, and Agent preset switching in new chats
|
||||
- switch "Coding Tools"
|
||||
- text: Keyboard shortcuts
|
||||
- paragraph: Browse available shortcuts and input actions
|
||||
- button "View shortcuts"
|
||||
- paragraph: View and edit available shortcuts and input actions
|
||||
- button "Edit shortcuts"
|
||||
- text: Send behavior while busy What Enter and the Send button do while the agent is running; Cmd/Ctrl+Enter uses the other behavior
|
||||
- button "Queue"
|
||||
- text: "Current version: {{version}}"
|
||||
@@ -25,8 +25,8 @@
|
||||
- text: 代码工作工具 开启后显示轨迹、本轮代码差异,新对话中的 Agent 预设切换
|
||||
- switch "代码工作工具"
|
||||
- text: 快捷键
|
||||
- paragraph: 查看当前可用的快捷键和输入操作
|
||||
- button "查看快捷键"
|
||||
- paragraph: 查看和编辑当前可用的快捷键和输入操作
|
||||
- button "编辑快捷键"
|
||||
- text: 繁忙时的发送行为 智能体运行时 Enter 键和发送按钮的行为;Cmd/Ctrl+Enter 使用另一行为
|
||||
- button "排队发送"
|
||||
- text: 当前版本:{{version}}
|
||||
@@ -1,5 +1,3 @@
|
||||
- listitem:
|
||||
- text: New Session
|
||||
- button "Remove shortcut for New Session"
|
||||
- button "Edit shortcut for New Session"
|
||||
- button "New Session A B": A B
|
||||
- text: New Session A B
|
||||
@@ -1,5 +1,3 @@
|
||||
- listitem:
|
||||
- text: New Session
|
||||
- button "Remove shortcut for New Session"
|
||||
- button "Edit shortcut for New Session"
|
||||
- button "New Session ⌘ C": ⌘ C
|
||||
- text: New Session ⌘ C
|
||||
@@ -1,5 +1,3 @@
|
||||
- listitem:
|
||||
- text: New Session
|
||||
- button "Remove shortcut for New Session"
|
||||
- button "Edit shortcut for New Session"
|
||||
- button "New Session Ctrl + C": Ctrl + C
|
||||
- text: New Session Ctrl + C
|
||||
@@ -7,126 +7,72 @@
|
||||
- region "Application":
|
||||
- list:
|
||||
- listitem:
|
||||
- text: Open keyboard shortcuts
|
||||
- button "Remove shortcut for Open keyboard shortcuts"
|
||||
- button "Edit shortcut for Open keyboard shortcuts"
|
||||
- button "Open keyboard shortcuts ⌘ /": ⌘ /
|
||||
- text: Open keyboard shortcuts ⌘ /
|
||||
- listitem:
|
||||
- text: New Session
|
||||
- button "Remove shortcut for New Session"
|
||||
- button "Edit shortcut for New Session"
|
||||
- button "New Session ⌥ ⌘ N": ⌥ ⌘ N
|
||||
- text: New Session ⌥ ⌘ N
|
||||
- listitem:
|
||||
- text: Toggle left sidebar
|
||||
- button "Remove shortcut for Toggle left sidebar"
|
||||
- button "Edit shortcut for Toggle left sidebar"
|
||||
- button "Toggle left sidebar ⌥ ⌘ B": ⌥ ⌘ B
|
||||
- text: Toggle left sidebar ⌥ ⌘ B
|
||||
- listitem:
|
||||
- text: Search sessions
|
||||
- button "Remove shortcut for Search sessions"
|
||||
- button "Edit shortcut for Search sessions"
|
||||
- button "Search sessions ⌥ ⌘ K": ⌥ ⌘ K
|
||||
- text: Search sessions ⌥ ⌘ K
|
||||
- listitem:
|
||||
- text: Add workspace
|
||||
- button "Remove shortcut for Add workspace"
|
||||
- button "Edit shortcut for Add workspace"
|
||||
- button "Add workspace ⌥ ⌘ O": ⌥ ⌘ O
|
||||
- text: Add workspace ⌥ ⌘ O
|
||||
- listitem:
|
||||
- text: Rename session
|
||||
- button "Remove shortcut for Rename session"
|
||||
- button "Edit shortcut for Rename session"
|
||||
- button "Rename session ⇧ ⌘ R": ⇧ ⌘ R
|
||||
- text: Rename session ⇧ ⌘ R
|
||||
- listitem:
|
||||
- text: Fork session
|
||||
- button "Remove shortcut for Fork session"
|
||||
- button "Edit shortcut for Fork session"
|
||||
- button "Fork session ⇧ ⌘ F": ⇧ ⌘ F
|
||||
- text: Fork session ⇧ ⌘ F
|
||||
- listitem:
|
||||
- text: Archive session
|
||||
- button "Remove shortcut for Archive session"
|
||||
- button "Edit shortcut for Archive session"
|
||||
- button "Archive session ⌥ ⌘ A": ⌥ ⌘ A
|
||||
- text: Archive session ⌥ ⌘ A
|
||||
- listitem:
|
||||
- text: Open settings
|
||||
- button "Remove shortcut for Open settings"
|
||||
- button "Edit shortcut for Open settings"
|
||||
- button "Open settings ⌘ ,": ⌘ ,
|
||||
- text: Open settings ⌘ ,
|
||||
- listitem:
|
||||
- text: Toggle right sidebar
|
||||
- button "Remove shortcut for Toggle right sidebar"
|
||||
- button "Edit shortcut for Toggle right sidebar"
|
||||
- button "Toggle right sidebar ⇧ ⌘ B": ⇧ ⌘ B
|
||||
- text: Toggle right sidebar ⇧ ⌘ B
|
||||
- listitem:
|
||||
- text: Workspace files
|
||||
- button "Remove shortcut for Workspace files"
|
||||
- button "Edit shortcut for Workspace files"
|
||||
- button "Workspace files ⌥ ⌘ P": ⌥ ⌘ P
|
||||
- text: Workspace files ⌥ ⌘ P
|
||||
- listitem:
|
||||
- text: New terminal
|
||||
- button "Remove shortcut for New terminal"
|
||||
- button "Edit shortcut for New terminal"
|
||||
- 'button "New terminal ⌃ `"': "⌃ `"
|
||||
- text: "New terminal ⌃ `"
|
||||
- listitem:
|
||||
- text: Split
|
||||
- button "Remove shortcut for Split"
|
||||
- button "Edit shortcut for Split"
|
||||
- button "Split ⌘ \\": ⌘ \
|
||||
- text: Split ⌘ \
|
||||
- listitem:
|
||||
- text: Toggle panel fullscreen
|
||||
- button "Remove shortcut for Toggle panel fullscreen"
|
||||
- button "Edit shortcut for Toggle panel fullscreen"
|
||||
- button "Toggle panel fullscreen ⌥ ⌘ Enter": ⌥ ⌘ Enter
|
||||
- text: Toggle panel fullscreen ⌥ ⌘ Enter
|
||||
- listitem:
|
||||
- text: Refresh current page
|
||||
- button "Edit shortcut for Refresh current page"
|
||||
- button "Refresh current page No shortcut": No shortcut
|
||||
- text: Refresh current page No shortcut
|
||||
- listitem:
|
||||
- text: Close current page or window
|
||||
- button "Remove shortcut for Close current page or window"
|
||||
- button "Edit shortcut for Close current page or window"
|
||||
- button "Close current page or window ⌥ ⌘ W": ⌥ ⌘ W
|
||||
- listitem:
|
||||
- text: Stop generating
|
||||
- button "Stop generating Esc Esc" [disabled]: Esc Esc
|
||||
- text: Close current page or window ⌥ ⌘ W
|
||||
- region "Message input":
|
||||
- heading "Message input" [level=3]
|
||||
- list:
|
||||
- listitem:
|
||||
- text: Use the complementary Queue / Steer action
|
||||
- button "Use the complementary Queue / Steer action ⌘ Enter" [disabled]: ⌘ Enter
|
||||
- listitem:
|
||||
- text: Open reference menu
|
||||
- button "Open reference menu @" [disabled]: "@"
|
||||
- listitem:
|
||||
- text: New line
|
||||
- button "New line ⇧ Enter" [disabled]: ⇧ Enter
|
||||
- listitem:
|
||||
- text: Send message
|
||||
- button "Send message Enter" [disabled]: Enter
|
||||
- listitem:
|
||||
- text: Open command menu
|
||||
- button "Open command menu /" [disabled]: /
|
||||
- listitem: Use the complementary Queue / Steer action ⌘ Enter
|
||||
- listitem: Open reference menu @
|
||||
- listitem: New line ⇧ Enter
|
||||
- listitem: Send message Enter
|
||||
- listitem: Open command menu /
|
||||
- listitem: Stop generating Esc Esc
|
||||
- region "Menus and dialogs":
|
||||
- heading "Menus and dialogs" [level=3]
|
||||
- list:
|
||||
- listitem:
|
||||
- text: Close menu or top dialog
|
||||
- button "Close menu or top dialog Esc" [disabled]: Esc
|
||||
- listitem:
|
||||
- text: Move menu selection
|
||||
- button "Move menu selection ↑ ↓" [disabled]: ↑ ↓
|
||||
- listitem:
|
||||
- text: Select menu item
|
||||
- button "Select menu item Enter" [disabled]: Enter
|
||||
- listitem: Close menu or top dialog Esc
|
||||
- listitem: Move menu selection ↑ ↓
|
||||
- listitem: Select menu item Enter
|
||||
- region "Approval area":
|
||||
- heading "Approval area" [level=3]
|
||||
- list:
|
||||
- listitem:
|
||||
- text: Allow once
|
||||
- button "Allow once Enter" [disabled]: Enter
|
||||
- listitem:
|
||||
- text: Reject
|
||||
- button "Reject Esc" [disabled]: Esc
|
||||
- listitem: Allow once Enter
|
||||
- listitem: Reject Esc
|
||||
- contentinfo:
|
||||
- button "Restore all defaults" [disabled]
|
||||
- text: 0 customized
|
||||
@@ -4,6 +4,7 @@
|
||||
- button "Close keyboard shortcuts"
|
||||
- search "Search shortcuts":
|
||||
- searchbox "Search shortcuts": abc
|
||||
- button "Clear search"
|
||||
- status: No matching shortcuts
|
||||
- contentinfo:
|
||||
- button "Restore all defaults"
|
||||
|
||||
@@ -7,127 +7,72 @@
|
||||
- region "Application":
|
||||
- list:
|
||||
- listitem:
|
||||
- text: Open keyboard shortcuts
|
||||
- button "Remove shortcut for Open keyboard shortcuts"
|
||||
- button "Edit shortcut for Open keyboard shortcuts"
|
||||
- button "Open keyboard shortcuts Ctrl + /": Ctrl + /
|
||||
- text: Open keyboard shortcuts Ctrl + /
|
||||
- listitem:
|
||||
- text: New Session
|
||||
- button "Remove shortcut for New Session"
|
||||
- button "Edit shortcut for New Session"
|
||||
- button "New Session Ctrl + Alt + N": Ctrl + Alt + N
|
||||
- text: New Session Ctrl + Alt + N
|
||||
- listitem:
|
||||
- text: Toggle left sidebar
|
||||
- button "Remove shortcut for Toggle left sidebar"
|
||||
- button "Edit shortcut for Toggle left sidebar"
|
||||
- button "Toggle left sidebar Ctrl + Alt + B": Ctrl + Alt + B
|
||||
- text: Toggle left sidebar Ctrl + Alt + B
|
||||
- listitem:
|
||||
- text: Search sessions
|
||||
- button "Remove shortcut for Search sessions"
|
||||
- button "Edit shortcut for Search sessions"
|
||||
- button "Search sessions Ctrl + Alt + K": Ctrl + Alt + K
|
||||
- text: Search sessions Ctrl + Alt + K
|
||||
- listitem:
|
||||
- text: Add workspace
|
||||
- button "Remove shortcut for Add workspace"
|
||||
- button "Edit shortcut for Add workspace"
|
||||
- button "Add workspace Ctrl + Alt + O": Ctrl + Alt + O
|
||||
- text: Add workspace Ctrl + Alt + O
|
||||
- listitem:
|
||||
- text: Rename session
|
||||
- button "Remove shortcut for Rename session"
|
||||
- button "Edit shortcut for Rename session"
|
||||
- button "Rename session Ctrl + Shift + R": Ctrl + Shift + R
|
||||
- text: Rename session Ctrl + Shift + R
|
||||
- listitem:
|
||||
- text: Fork session
|
||||
- button "Remove shortcut for Fork session"
|
||||
- button "Edit shortcut for Fork session"
|
||||
- button "Fork session Ctrl + Shift + F": Ctrl + Shift + F
|
||||
- text: Fork session Ctrl + Shift + F
|
||||
- listitem:
|
||||
- text: Archive session
|
||||
- button "Remove shortcut for Archive session"
|
||||
- button "Edit shortcut for Archive session"
|
||||
- button "Archive session Ctrl + Alt + A": Ctrl + Alt + A
|
||||
- text: Archive session Ctrl + Alt + A
|
||||
- listitem:
|
||||
- text: Open settings
|
||||
- button "Remove shortcut for Open settings"
|
||||
- button "Edit shortcut for Open settings"
|
||||
- button "Open settings Ctrl + ,": Ctrl + ,
|
||||
- text: Open settings Ctrl + ,
|
||||
- listitem:
|
||||
- text: Toggle right sidebar
|
||||
- button "Remove shortcut for Toggle right sidebar"
|
||||
- button "Edit shortcut for Toggle right sidebar"
|
||||
- button "Toggle right sidebar Ctrl + Shift + B": Ctrl + Shift + B
|
||||
- text: Toggle right sidebar Ctrl + Shift + B
|
||||
- listitem:
|
||||
- text: Workspace files
|
||||
- button "Remove shortcut for Workspace files"
|
||||
- button "Edit shortcut for Workspace files"
|
||||
- button "Workspace files Ctrl + Alt + P": Ctrl + Alt + P
|
||||
- text: Workspace files Ctrl + Alt + P
|
||||
- listitem:
|
||||
- text: New terminal
|
||||
- button "Remove shortcut for New terminal"
|
||||
- button "Edit shortcut for New terminal"
|
||||
- 'button "New terminal Ctrl + `"': "Ctrl + `"
|
||||
- text: "New terminal Ctrl + `"
|
||||
- listitem:
|
||||
- text: Split
|
||||
- button "Remove shortcut for Split"
|
||||
- button "Edit shortcut for Split"
|
||||
- button "Split Ctrl + \\": Ctrl + \
|
||||
- text: Split Ctrl + \
|
||||
- listitem:
|
||||
- text: Toggle panel fullscreen
|
||||
- button "Remove shortcut for Toggle panel fullscreen"
|
||||
- button "Edit shortcut for Toggle panel fullscreen"
|
||||
- button "Toggle panel fullscreen Ctrl + Alt + Enter": Ctrl + Alt + Enter
|
||||
- text: Toggle panel fullscreen Ctrl + Alt + Enter
|
||||
- listitem:
|
||||
- text: Refresh current page
|
||||
- button "Remove shortcut for Refresh current page"
|
||||
- button "Edit shortcut for Refresh current page"
|
||||
- button "Refresh current page Ctrl + Alt + R": Ctrl + Alt + R
|
||||
- text: Refresh current page Ctrl + Alt + R
|
||||
- listitem:
|
||||
- text: Close current page or window
|
||||
- button "Remove shortcut for Close current page or window"
|
||||
- button "Edit shortcut for Close current page or window"
|
||||
- button "Close current page or window Ctrl + Alt + W": Ctrl + Alt + W
|
||||
- listitem:
|
||||
- text: Stop generating
|
||||
- button "Stop generating Esc Esc" [disabled]: Esc Esc
|
||||
- text: Close current page or window Ctrl + Alt + W
|
||||
- region "Message input":
|
||||
- heading "Message input" [level=3]
|
||||
- list:
|
||||
- listitem:
|
||||
- text: Use the complementary Queue / Steer action
|
||||
- button "Use the complementary Queue / Steer action Ctrl + Enter" [disabled]: Ctrl + Enter
|
||||
- listitem:
|
||||
- text: Open reference menu
|
||||
- button "Open reference menu @" [disabled]: "@"
|
||||
- listitem:
|
||||
- text: New line
|
||||
- button "New line Shift + Enter" [disabled]: Shift + Enter
|
||||
- listitem:
|
||||
- text: Send message
|
||||
- button "Send message Enter" [disabled]: Enter
|
||||
- listitem:
|
||||
- text: Open command menu
|
||||
- button "Open command menu /" [disabled]: /
|
||||
- listitem: Use the complementary Queue / Steer action Ctrl + Enter
|
||||
- listitem: Open reference menu @
|
||||
- listitem: New line Shift + Enter
|
||||
- listitem: Send message Enter
|
||||
- listitem: Open command menu /
|
||||
- listitem: Stop generating Esc Esc
|
||||
- region "Menus and dialogs":
|
||||
- heading "Menus and dialogs" [level=3]
|
||||
- list:
|
||||
- listitem:
|
||||
- text: Close menu or top dialog
|
||||
- button "Close menu or top dialog Esc" [disabled]: Esc
|
||||
- listitem:
|
||||
- text: Move menu selection
|
||||
- button "Move menu selection ↑ ↓" [disabled]: ↑ ↓
|
||||
- listitem:
|
||||
- text: Select menu item
|
||||
- button "Select menu item Enter" [disabled]: Enter
|
||||
- listitem: Close menu or top dialog Esc
|
||||
- listitem: Move menu selection ↑ ↓
|
||||
- listitem: Select menu item Enter
|
||||
- region "Approval area":
|
||||
- heading "Approval area" [level=3]
|
||||
- list:
|
||||
- listitem:
|
||||
- text: Allow once
|
||||
- button "Allow once Enter" [disabled]: Enter
|
||||
- listitem:
|
||||
- text: Reject
|
||||
- button "Reject Esc" [disabled]: Esc
|
||||
- listitem: Allow once Enter
|
||||
- listitem: Reject Esc
|
||||
- contentinfo:
|
||||
- button "Restore all defaults" [disabled]
|
||||
- text: 0 customized
|
||||
@@ -4,6 +4,7 @@
|
||||
- button "关闭快捷键"
|
||||
- search "搜索快捷键":
|
||||
- searchbox "搜索快捷键": abc
|
||||
- button "清空搜索"
|
||||
- status: 没有匹配的快捷键
|
||||
- contentinfo:
|
||||
- button "恢复全部默认"
|
||||
|
||||
@@ -7,126 +7,72 @@
|
||||
- region "应用操作":
|
||||
- list:
|
||||
- listitem:
|
||||
- text: 快捷键速查
|
||||
- button "移除快捷键速查快捷键"
|
||||
- button "修改快捷键速查快捷键"
|
||||
- button "快捷键速查 ⌘ /": ⌘ /
|
||||
- text: 快捷键速查 ⌘ /
|
||||
- listitem:
|
||||
- text: 新会话
|
||||
- button "移除新会话快捷键"
|
||||
- button "修改新会话快捷键"
|
||||
- button "新会话 ⌥ ⌘ N": ⌥ ⌘ N
|
||||
- text: 新会话 ⌥ ⌘ N
|
||||
- listitem:
|
||||
- text: 展开/收起左侧栏
|
||||
- button "移除展开/收起左侧栏快捷键"
|
||||
- button "修改展开/收起左侧栏快捷键"
|
||||
- button "展开/收起左侧栏 ⌥ ⌘ B": ⌥ ⌘ B
|
||||
- text: 展开/收起左侧栏 ⌥ ⌘ B
|
||||
- listitem:
|
||||
- text: 搜索会话
|
||||
- button "移除搜索会话快捷键"
|
||||
- button "修改搜索会话快捷键"
|
||||
- button "搜索会话 ⌥ ⌘ K": ⌥ ⌘ K
|
||||
- text: 搜索会话 ⌥ ⌘ K
|
||||
- listitem:
|
||||
- text: 添加工作区
|
||||
- button "移除添加工作区快捷键"
|
||||
- button "修改添加工作区快捷键"
|
||||
- button "添加工作区 ⌥ ⌘ O": ⌥ ⌘ O
|
||||
- text: 添加工作区 ⌥ ⌘ O
|
||||
- listitem:
|
||||
- text: 重命名会话
|
||||
- button "移除重命名会话快捷键"
|
||||
- button "修改重命名会话快捷键"
|
||||
- button "重命名会话 ⇧ ⌘ R": ⇧ ⌘ R
|
||||
- text: 重命名会话 ⇧ ⌘ R
|
||||
- listitem:
|
||||
- text: 分叉会话
|
||||
- button "移除分叉会话快捷键"
|
||||
- button "修改分叉会话快捷键"
|
||||
- button "分叉会话 ⇧ ⌘ F": ⇧ ⌘ F
|
||||
- text: 分叉会话 ⇧ ⌘ F
|
||||
- listitem:
|
||||
- text: 归档会话
|
||||
- button "移除归档会话快捷键"
|
||||
- button "修改归档会话快捷键"
|
||||
- button "归档会话 ⌥ ⌘ A": ⌥ ⌘ A
|
||||
- text: 归档会话 ⌥ ⌘ A
|
||||
- listitem:
|
||||
- text: 打开设置
|
||||
- button "移除打开设置快捷键"
|
||||
- button "修改打开设置快捷键"
|
||||
- button "打开设置 ⌘ ,": ⌘ ,
|
||||
- text: 打开设置 ⌘ ,
|
||||
- listitem:
|
||||
- text: 展开/收起右侧栏
|
||||
- button "移除展开/收起右侧栏快捷键"
|
||||
- button "修改展开/收起右侧栏快捷键"
|
||||
- button "展开/收起右侧栏 ⇧ ⌘ B": ⇧ ⌘ B
|
||||
- text: 展开/收起右侧栏 ⇧ ⌘ B
|
||||
- listitem:
|
||||
- text: 工作区文件
|
||||
- button "移除工作区文件快捷键"
|
||||
- button "修改工作区文件快捷键"
|
||||
- button "工作区文件 ⌥ ⌘ P": ⌥ ⌘ P
|
||||
- text: 工作区文件 ⌥ ⌘ P
|
||||
- listitem:
|
||||
- text: 新建终端
|
||||
- button "移除新建终端快捷键"
|
||||
- button "修改新建终端快捷键"
|
||||
- 'button "新建终端 ⌃ `"': "⌃ `"
|
||||
- text: "新建终端 ⌃ `"
|
||||
- listitem:
|
||||
- text: 分栏
|
||||
- button "移除分栏快捷键"
|
||||
- button "修改分栏快捷键"
|
||||
- button "分栏 ⌘ \\": ⌘ \
|
||||
- text: 分栏 ⌘ \
|
||||
- listitem:
|
||||
- text: 面板全屏/退出全屏
|
||||
- button "移除面板全屏/退出全屏快捷键"
|
||||
- button "修改面板全屏/退出全屏快捷键"
|
||||
- button "面板全屏/退出全屏 ⌥ ⌘ Enter": ⌥ ⌘ Enter
|
||||
- text: 面板全屏/退出全屏 ⌥ ⌘ Enter
|
||||
- listitem:
|
||||
- text: 刷新当前页面
|
||||
- button "修改刷新当前页面快捷键"
|
||||
- button "刷新当前页面 暂无快捷键": 暂无快捷键
|
||||
- text: 刷新当前页面 暂无快捷键
|
||||
- listitem:
|
||||
- text: 关闭当前页面/窗口
|
||||
- button "移除关闭当前页面/窗口快捷键"
|
||||
- button "修改关闭当前页面/窗口快捷键"
|
||||
- button "关闭当前页面/窗口 ⌥ ⌘ W": ⌥ ⌘ W
|
||||
- listitem:
|
||||
- text: 停止生成
|
||||
- button "停止生成 Esc Esc" [disabled]: Esc Esc
|
||||
- text: 关闭当前页面/窗口 ⌥ ⌘ W
|
||||
- region "消息输入":
|
||||
- heading "消息输入" [level=3]
|
||||
- list:
|
||||
- listitem:
|
||||
- text: 使用互补的 Queue/Steer 方式
|
||||
- button "使用互补的 Queue/Steer 方式 ⌘ Enter" [disabled]: ⌘ Enter
|
||||
- listitem:
|
||||
- text: 打开引用菜单
|
||||
- button "打开引用菜单 @" [disabled]: "@"
|
||||
- listitem:
|
||||
- text: 换行
|
||||
- button "换行 ⇧ Enter" [disabled]: ⇧ Enter
|
||||
- listitem:
|
||||
- text: 发送消息
|
||||
- button "发送消息 Enter" [disabled]: Enter
|
||||
- listitem:
|
||||
- text: 打开命令菜单
|
||||
- button "打开命令菜单 /" [disabled]: /
|
||||
- listitem: 使用互补的 Queue/Steer 方式 ⌘ Enter
|
||||
- listitem: 打开引用菜单 @
|
||||
- listitem: 换行 ⇧ Enter
|
||||
- listitem: 发送消息 Enter
|
||||
- listitem: 打开命令菜单 /
|
||||
- listitem: 停止生成 Esc Esc
|
||||
- region "菜单与弹层":
|
||||
- heading "菜单与弹层" [level=3]
|
||||
- list:
|
||||
- listitem:
|
||||
- text: 关闭菜单或顶层弹窗
|
||||
- button "关闭菜单或顶层弹窗 Esc" [disabled]: Esc
|
||||
- listitem:
|
||||
- text: 移动菜单选择
|
||||
- button "移动菜单选择 ↑ ↓" [disabled]: ↑ ↓
|
||||
- listitem:
|
||||
- text: 选择菜单项
|
||||
- button "选择菜单项 Enter" [disabled]: Enter
|
||||
- listitem: 关闭菜单或顶层弹窗 Esc
|
||||
- listitem: 移动菜单选择 ↑ ↓
|
||||
- listitem: 选择菜单项 Enter
|
||||
- region "审批区域":
|
||||
- heading "审批区域" [level=3]
|
||||
- list:
|
||||
- listitem:
|
||||
- text: 允许一次
|
||||
- button "允许一次 Enter" [disabled]: Enter
|
||||
- listitem:
|
||||
- text: 拒绝
|
||||
- button "拒绝 Esc" [disabled]: Esc
|
||||
- listitem: 允许一次 Enter
|
||||
- listitem: 拒绝 Esc
|
||||
- contentinfo:
|
||||
- button "恢复全部默认" [disabled]
|
||||
- text: 0 项已自定义
|
||||
@@ -1 +1 @@
|
||||
Prefer showing the primary results within your final response alongside a brief explanation. Use  when an image supports an explanation or comparison. Use [Description](<path/to/image.png>) when referring to an image or listing files. Enclose Markdown file destinations in angle brackets, especially paths containing spaces. Do not call present just to list edited source files, or run commands to check whether a diff view will appear. Use present when a separate file card helps the user open the complete deliverable, including images, Office documents, spreadsheets, and slide decks. Each presented file adds a card below the reply, with preview and native-open actions. Usually select the 1-2 most important deliverables; include more when needed, but at most 4 files in a single present call. Avoid repeating results already shown inline unless the separate card adds useful access. Outside commands, configuration expressions, and code blocks, link every mention of an existing file, including repeats and tables, to its full path relative to the working directory or absolute; append #L24 or #L24-L30 to the target for known lines. Use the filename or a clear alias as the label, adding only enough parent directories to distinguish files; keep full paths out of labels. Default to the name alone; when precise locations matter, append :24 or :24–30, with no # or L in the line suffix.
|
||||
Prefer showing the primary results within your final response alongside a brief explanation. Use  when an image supports an explanation or comparison. Use [Description](<path/to/image.png>) when referring to an image or listing files. Enclose Markdown file destinations in angle brackets, especially paths containing spaces. Do not call present just to list edited source files, or run commands to check whether a diff view will appear. Use present when a separate file card helps the user open the complete deliverable, including images, Office documents, spreadsheets, and slide decks. Each presented file adds a card below the reply, with preview and native-open actions. Avoid repeating results already shown inline unless the separate card adds useful access. Outside commands, configuration expressions, and code blocks, link every mention of an existing file, including repeats and tables, to its full path relative to the working directory or absolute; append #L24 or #L24-L30 to the target for known lines. Use the filename or a clear alias as the label, adding only enough parent directories to distinguish files; keep full paths out of labels. Default to the name alone; when precise locations matter, append :24 or :24–30, with no # or L in the line suffix.
|
||||
@@ -23,9 +23,9 @@ async function bind(page: Page, primary: string, label: string, previous?: strin
|
||||
expect(await row.getByText('Unavailable', { exact: true }).count()).toBe(0)
|
||||
}
|
||||
if (previous !== undefined) {
|
||||
const remove = dialog.getByRole('button', { name: `Remove shortcut for ${previous}`, exact: true })
|
||||
await remove.click()
|
||||
await remove.waitFor({ state: 'hidden' })
|
||||
await dialog.getByRole('button', { name: `Edit shortcut for ${previous}`, exact: true }).click()
|
||||
await dialog.getByRole('button', { name: 'Remove', exact: true }).click()
|
||||
await dialog.getByRole('group').waitFor({ state: 'hidden' })
|
||||
}
|
||||
await dialog.getByRole('button', { name: `Edit shortcut for ${label}`, exact: true }).click()
|
||||
const recorder = dialog.getByRole('group', { name: label, exact: true })
|
||||
@@ -125,6 +125,19 @@ describe.skipIf(process.platform === 'win32')('Web sidebar shortcuts', () => {
|
||||
await terminalGuide.focus()
|
||||
expect(await page.getByRole('tooltip').count()).toBe(0)
|
||||
|
||||
const terminalEntry = panel.locator('[data-sidebar-right-guide-entry="terminal"]')
|
||||
const shellMenu = terminalEntry.getByRole('button', { name: 'Choose shell', exact: true })
|
||||
const titleBounds = await terminalEntry.getByText('New terminal', { exact: true }).boundingBox()
|
||||
const arrowBounds = await shellMenu.boundingBox()
|
||||
expect(arrowBounds!.x).toBeGreaterThanOrEqual(titleBounds!.x + titleBounds!.width)
|
||||
expect(arrowBounds!.x - titleBounds!.x - titleBounds!.width).toBeLessThan(8)
|
||||
await shellMenu.click()
|
||||
await page.getByRole('menu').waitFor()
|
||||
expect(await panel.locator('[data-sidebar-terminal]').count()).toBe(0)
|
||||
await page.keyboard.press('Escape')
|
||||
await page.getByRole('menu').waitFor({ state: 'detached' })
|
||||
expect(await shellMenu.evaluate(element => element === document.activeElement)).toBe(true)
|
||||
|
||||
await bind(page, primary, 'Browser', 'Toggle right sidebar')
|
||||
const browserGuide = panel.locator('[data-sidebar-right-guide-entry="browser"]')
|
||||
await browserGuide.hover()
|
||||
|
||||
@@ -61,8 +61,9 @@ describe.skipIf(mode === 'record')('web e2e: workspace shortcuts', () => {
|
||||
expect(await row.getByText('Unavailable', { exact: true }).count()).toBe(0)
|
||||
}
|
||||
if (previous !== undefined) {
|
||||
await reference.getByRole('button', { name: `Remove shortcut for ${previous}`, exact: true }).click()
|
||||
await expect.poll(() => reference.getByRole('button', { name: `Remove shortcut for ${previous}`, exact: true }).count()).toBe(0)
|
||||
await reference.getByRole('button', { name: `Edit shortcut for ${previous}`, exact: true }).click()
|
||||
await reference.getByRole('button', { name: 'Remove', exact: true }).click()
|
||||
await reference.getByRole('group').waitFor({ state: 'hidden' })
|
||||
}
|
||||
await reference.getByRole('button', { name: `Edit shortcut for ${label}`, exact: true }).click()
|
||||
await page.keyboard.press('Meta+Shift+Comma')
|
||||
|
||||
@@ -19,8 +19,8 @@ describe('web e2e: shortcut reference', () => {
|
||||
afterAll(async () => { await browser?.close(); await scaffold?.close() })
|
||||
|
||||
it.each([
|
||||
{ locale: 'zh-CN', platform: 'MacIntel', title: '快捷键', settings: '设置', view: '查看快捷键', search: '搜索快捷键', key: 'Meta' },
|
||||
{ locale: 'en-US', platform: 'Win32', title: 'Keyboard shortcuts', settings: 'Settings', view: 'View shortcuts', search: 'Search shortcuts', key: 'Control' },
|
||||
{ locale: 'zh-CN', platform: 'MacIntel', title: '快捷键', settings: '设置', view: '编辑快捷键', search: '搜索快捷键', key: 'Meta' },
|
||||
{ locale: 'en-US', platform: 'Win32', title: 'Keyboard shortcuts', settings: 'Settings', view: 'Edit shortcuts', search: 'Search shortcuts', key: 'Control' },
|
||||
])('opens, searches, and restores nested focus in $locale', async ({ locale, platform, title, settings, view, search, key }) => {
|
||||
const referenceKey = platform === 'Win32' ? 'Control+Slash' : 'Meta+Slash'
|
||||
const context = await browser.newContext({ locale, colorScheme: 'light', viewport: { width: 1440, height: 1000 } })
|
||||
@@ -46,14 +46,13 @@ describe('web e2e: shortcut reference', () => {
|
||||
const resetAll = dialog.getByRole('button', { name: locale === 'zh-CN' ? '恢复全部默认' : 'Restore all defaults', exact: true })
|
||||
expect(await resetAll.isDisabled()).toBe(true)
|
||||
expect(await dialog.boundingBox()).toMatchObject({ width: 480, height: 600 })
|
||||
expect(await dialog.getByRole('search').boundingBox()).toMatchObject({ width: 432, height: 36 })
|
||||
expect(await dialog.getByRole('search').boundingBox()).toMatchObject({ width: 440, height: 36 })
|
||||
const rows = dialog.getByRole('listitem')
|
||||
const stopRow = dialog.getByRole('region', { name: locale === 'zh-CN' ? '应用操作' : 'Application', exact: true })
|
||||
const stopRow = dialog.getByRole('region', { name: locale === 'zh-CN' ? '消息输入' : 'Message input', exact: true })
|
||||
.getByRole('listitem').last()
|
||||
await stopRow.getByText(locale === 'zh-CN' ? '停止生成' : 'Stop generating', { exact: true }).waitFor()
|
||||
const stopButtons = stopRow.getByRole('button')
|
||||
expect(await stopButtons.count()).toBe(1)
|
||||
expect(await stopButtons.isDisabled()).toBe(true)
|
||||
expect(await stopButtons.count()).toBe(0)
|
||||
expect(new Set(await rows.evaluateAll(items => items.map(row => row.getBoundingClientRect().height))))
|
||||
.toEqual(new Set([42]))
|
||||
expect(await rows.evaluateAll(items => items.every(row => row.getBoundingClientRect().height >= 42
|
||||
@@ -72,29 +71,22 @@ describe('web e2e: shortcut reference', () => {
|
||||
const dialogShadow = await dialog.evaluate(element => getComputedStyle(element).boxShadow)
|
||||
await compareOrRefreshGolden(join(expected, `${locale}.expected.md`),
|
||||
await captureStableAria(page, '[data-shortcut-modal="shortcuts"]', scaffold.workspaceCwd), mode)
|
||||
const fixedButtons = dialog.getByRole('button', { disabled: true })
|
||||
const fixedButton = fixedButtons.first()
|
||||
expect(await fixedButton.evaluate(element => getComputedStyle(element).opacity)).toBe('0.45')
|
||||
const fixedBackground = await fixedButton.locator('span').evaluate(element => getComputedStyle(element).backgroundColor)
|
||||
await fixedButton.hover()
|
||||
expect(await fixedButton.locator('span').evaluate(element => getComputedStyle(element).backgroundColor)).toBe(fixedBackground)
|
||||
const fixedBackground = await stopRow.evaluate(element => getComputedStyle(element).backgroundColor)
|
||||
await stopRow.hover()
|
||||
expect(await stopRow.evaluate(element => getComputedStyle(element).backgroundColor)).toBe(fixedBackground)
|
||||
const editLabel = locale === 'zh-CN' ? '修改展开/收起左侧栏快捷键' : 'Edit shortcut for Toggle left sidebar'
|
||||
const removeLabel = locale === 'zh-CN' ? '移除展开/收起左侧栏快捷键' : 'Remove shortcut for Toggle left sidebar'
|
||||
const row = dialog.getByRole('listitem').filter({ has: page.getByRole('button', { name: editLabel, exact: true }) })
|
||||
const editButton = page.getByRole('button', { name: editLabel, exact: true })
|
||||
expect(await editButton.evaluate(element => getComputedStyle(element.parentElement!).opacity)).toBe('0')
|
||||
expect(await row.locator('[class*="rowActions"]').evaluate(element => getComputedStyle(element).opacity)).toBe('0')
|
||||
const boundRow = dialog.getByRole('listitem').filter({ has: page.getByText(
|
||||
locale === 'zh-CN' ? '快捷键速查' : 'Open keyboard shortcuts', { exact: true },
|
||||
) })
|
||||
const badge = boundRow.getByRole('button').last()
|
||||
const badgeColor = () => badge.locator('span').evaluate(element => getComputedStyle(element).backgroundColor)
|
||||
const restingColor = await badgeColor()
|
||||
await boundRow.locator(':scope > span').first().hover()
|
||||
expect(await badgeColor()).toBe(restingColor)
|
||||
await badge.hover()
|
||||
expect(await badgeColor()).toBe('rgba(38, 49, 72, 0.14)')
|
||||
await boundRow.getByRole('button').first().hover()
|
||||
expect(await badgeColor()).toBe(restingColor)
|
||||
const badge = boundRow.getByRole('button', { name: locale === 'zh-CN' ? '修改快捷键速查快捷键' : 'Edit shortcut for Open keyboard shortcuts', exact: true })
|
||||
const restingColor = await boundRow.evaluate(element => getComputedStyle(element).backgroundColor)
|
||||
await badge.hover({ position: { x: 12, y: 12 } })
|
||||
expect(await boundRow.evaluate(element => getComputedStyle(element).backgroundColor)).not.toBe(restingColor)
|
||||
expect(await boundRow.evaluate(element => getComputedStyle(element).borderRadius)).toBe('12px')
|
||||
expect(await badge.boundingBox()).toEqual(await boundRow.boundingBox())
|
||||
await badge.click()
|
||||
await boundRow.getByRole('group').waitFor()
|
||||
expect(await searchSurfaceStyle()).toEqual(focusedSearchSurface)
|
||||
@@ -104,7 +96,7 @@ describe('web e2e: shortcut reference', () => {
|
||||
await page.keyboard.press('Escape')
|
||||
await boundRow.getByRole('group').waitFor({ state: 'hidden' })
|
||||
await dialog.getByRole('heading', { name: title, exact: true }).hover()
|
||||
const boundActionsOpacity = () => boundRow.getByRole('button').first().evaluate(element => getComputedStyle(element.parentElement!).opacity)
|
||||
const boundActionsOpacity = () => boundRow.locator('[class*="rowActions"]').evaluate(element => getComputedStyle(element).opacity)
|
||||
expect(await boundActionsOpacity()).toBe('0')
|
||||
expect(await dialog.evaluate(element => element === document.activeElement)).toBe(true)
|
||||
expect(await dialog.evaluate(element => getComputedStyle(element).outlineStyle)).toBe('none')
|
||||
@@ -118,14 +110,17 @@ describe('web e2e: shortcut reference', () => {
|
||||
await dialog.getByRole('heading', { name: title, exact: true }).hover()
|
||||
expect(await boundActionsOpacity()).toBe('0')
|
||||
await row.hover()
|
||||
expect(await editButton.evaluate(element => getComputedStyle(element.parentElement!).opacity)).toBe('1')
|
||||
expect(await row.getByRole('button', { name: removeLabel, exact: true }).count()).toBe(1)
|
||||
expect(await row.locator('[class*="rowActions"]').evaluate(element => getComputedStyle(element).opacity)).toBe('1')
|
||||
expect(await row.getByRole('button').count()).toBe(1)
|
||||
await editButton.click()
|
||||
const inline = dialog.getByRole('group', { name: locale === 'zh-CN' ? '展开/收起左侧栏' : 'Toggle left sidebar', exact: true })
|
||||
const recorder = inline.getByRole('button', { name: locale === 'zh-CN' ? '按下快捷键' : 'Press a shortcut', exact: true })
|
||||
expect(await inline.getByRole('button', { name: locale === 'zh-CN' ? '移除' : 'Remove', exact: true }).count()).toBe(1)
|
||||
expect(await page.getByRole('dialog').count()).toBe(2)
|
||||
expect(await recorder.evaluate(element => getComputedStyle(element).color)).toBe('rgb(129, 133, 140)')
|
||||
expect(await recorder.evaluate(element => ({
|
||||
color: getComputedStyle(element).color, border: getComputedStyle(element).borderColor,
|
||||
})))
|
||||
.toEqual({ color: 'rgb(97, 102, 107)', border: 'rgba(0, 0, 0, 0.16)' })
|
||||
expect(await recorder.evaluate(element => ({
|
||||
focused: element === document.activeElement,
|
||||
outline: getComputedStyle(element).outlineStyle, shadow: getComputedStyle(element).boxShadow,
|
||||
@@ -155,7 +150,7 @@ describe('web e2e: shortcut reference', () => {
|
||||
expect(await dialog.evaluate(element => getComputedStyle(element).boxShadow)).toBe(dialogShadow)
|
||||
expect(await editButton.evaluate(element => element.matches(':focus-visible'))).toBe(false)
|
||||
await dialog.getByRole('heading', { name: title, exact: true }).hover()
|
||||
expect(await editButton.evaluate(element => getComputedStyle(element.parentElement!).opacity)).toBe('0')
|
||||
expect(await row.locator('[class*="rowActions"]').evaluate(element => getComputedStyle(element).opacity)).toBe('0')
|
||||
await page.keyboard.press('Shift+Tab')
|
||||
expect(await resetAll.evaluate(element => element === document.activeElement)).toBe(true)
|
||||
expect(await resetAll.evaluate(element => getComputedStyle(element).outlineStyle)).not.toBe('none')
|
||||
@@ -168,12 +163,14 @@ describe('web e2e: shortcut reference', () => {
|
||||
}))).toEqual({ background: 'rgb(67, 69, 74)', color: 'rgb(255, 255, 255)' })
|
||||
await page.emulateMedia({ colorScheme: 'light' })
|
||||
await expect.poll(() => successToast.evaluate(element => getComputedStyle(element).backgroundColor)).toBe('rgb(53, 54, 56)')
|
||||
await page.getByRole('button', { name: removeLabel, exact: true }).click()
|
||||
await editButton.click()
|
||||
await inline.getByRole('button', { name: locale === 'zh-CN' ? '移除' : 'Remove', exact: true }).click()
|
||||
await inline.waitFor({ state: 'hidden' })
|
||||
const unbound = row.getByText(locale === 'zh-CN' ? '暂无快捷键' : 'No shortcut', { exact: true })
|
||||
await unbound.waitFor()
|
||||
expect(await unbound.evaluate(element => getComputedStyle(element).color)).toBe('rgb(129, 133, 140)')
|
||||
expect(await row.getByRole('button', { name: removeLabel, exact: true }).count()).toBe(0)
|
||||
await unbound.click()
|
||||
expect(await row.getByRole('button').count()).toBe(1)
|
||||
await editButton.click({ position: { x: 12, y: 12 } })
|
||||
await inline.waitFor()
|
||||
expect(await inline.getByRole('button', { name: locale === 'zh-CN' ? '移除' : 'Remove', exact: true }).count()).toBe(0)
|
||||
await page.keyboard.press('Escape')
|
||||
@@ -182,7 +179,7 @@ describe('web e2e: shortcut reference', () => {
|
||||
expect(await dialog.evaluate(element => getComputedStyle(element).outlineStyle)).toBe('none')
|
||||
expect(await dialog.evaluate(element => getComputedStyle(element).boxShadow)).toBe(dialogShadow)
|
||||
await dialog.getByRole('heading', { name: title, exact: true }).hover()
|
||||
expect(await editButton.evaluate(element => getComputedStyle(element.parentElement!).opacity)).toBe('0')
|
||||
expect(await row.getByRole('button').count()).toBe(1)
|
||||
expect(await page.getByRole('dialog').count()).toBe(2)
|
||||
for (const query of ['abc', 'sendEnter']) {
|
||||
await page.getByRole('searchbox').fill(query)
|
||||
@@ -245,11 +242,13 @@ describe('web e2e: shortcut reference', () => {
|
||||
await page.setViewportSize({ width: 1440, height: 1000 })
|
||||
await openSettings(page, locale === 'zh-CN' ? 'zh' : 'en')
|
||||
const viewButton = page.getByRole('button', { name: view, exact: true })
|
||||
const viewHint = `${view} ${key === 'Meta' ? '⌘ /' : 'Ctrl + /'}`
|
||||
const viewHint = `${locale === 'zh-CN' ? '全局唤起查看' : 'Open from anywhere'} ${key === 'Meta' ? '⌘ /' : 'Ctrl + /'}`
|
||||
await viewButton.hover()
|
||||
expect(await page.getByRole('tooltip').textContent()).toBe(viewHint)
|
||||
expect(await page.getByRole('tooltip').getAttribute('aria-label')).toBe(viewHint)
|
||||
await viewButton.click()
|
||||
await boundRow.getByRole('button').first().click()
|
||||
await badge.click()
|
||||
await boundRow.getByRole('button', { name: locale === 'zh-CN' ? '移除' : 'Remove', exact: true }).click()
|
||||
await boundRow.getByRole('group').waitFor({ state: 'hidden' })
|
||||
await boundRow.getByText(locale === 'zh-CN' ? '暂无快捷键' : 'No shortcut', { exact: true }).waitFor()
|
||||
await page.keyboard.press('Escape')
|
||||
await dialog.waitFor({ state: 'hidden' })
|
||||
@@ -266,7 +265,7 @@ describe('web e2e: shortcut reference', () => {
|
||||
await page.keyboard.press('Escape')
|
||||
await dialog.waitFor({ state: 'hidden' })
|
||||
await viewButton.hover()
|
||||
expect(await page.getByRole('tooltip').textContent()).toBe(viewHint)
|
||||
expect(await page.getByRole('tooltip').getAttribute('aria-label')).toBe(viewHint)
|
||||
await viewButton.click()
|
||||
await page.getByRole('searchbox').fill('abc')
|
||||
expect(await dialog.getByRole('listitem').count()).toBe(0)
|
||||
@@ -286,7 +285,7 @@ describe('web e2e: shortcut reference', () => {
|
||||
await confirm.getByRole('button', { name: locale === 'zh-CN' ? '恢复默认' : 'Restore default', exact: true }).click()
|
||||
await confirm.waitFor({ state: 'hidden' })
|
||||
expect(await resetAll.isDisabled()).toBe(true)
|
||||
expect(await dialog.locator('footer').textContent()).toContain(locale === 'zh-CN' ? '0 项已自定义' : '0 customized')
|
||||
expect(await dialog.locator('footer').textContent()).toBe(locale === 'zh-CN' ? '恢复全部默认' : 'Restore all defaults')
|
||||
expect(await page.getByRole('searchbox').evaluate(element => element === document.activeElement)).toBe(true)
|
||||
expect(await searchInput.evaluate(element => getComputedStyle(element).outlineStyle)).toBe('none')
|
||||
expect(await searchSurfaceStyle()).toEqual(focusedSearchSurface)
|
||||
@@ -322,6 +321,65 @@ describe('web e2e: shortcut reference', () => {
|
||||
} finally { await context.close() }
|
||||
})
|
||||
|
||||
it.each([
|
||||
{ platform: 'Win32', primary: 'Control', keys: 'Ctrl + Alt + N' },
|
||||
{ platform: 'MacIntel', primary: 'Meta', keys: '⌥ ⇧ ⌘ F12' },
|
||||
])('shows the shortcut inside New Session on hover and keyboard focus at wide and narrow widths on $platform', async ({ platform, primary, keys }) => {
|
||||
const context = await browser.newContext({ locale: 'en-US', viewport: { width: 1440, height: 1000 } })
|
||||
try {
|
||||
await context.addInitScript((value) => { Object.defineProperty(navigator, 'platform', { value }) }, platform)
|
||||
const page = await context.newPage()
|
||||
await page.goto(scaffold.authenticatedUrl)
|
||||
const newSession = page.getByRole('button', { name: 'New session', exact: true }).filter({ hasText: 'New Session' })
|
||||
await newSession.waitFor()
|
||||
if (platform === 'MacIntel') await page.evaluate(() => { document.documentElement.dataset.platform = 'darwin' })
|
||||
await page.keyboard.press(`${primary}+/`)
|
||||
await page.getByRole('button', { name: 'Edit shortcut for New Session', exact: true }).click()
|
||||
await page.keyboard.press(platform === 'Win32' ? 'Control+Alt+N' : 'Meta+Alt+Shift+F12')
|
||||
await page.getByRole('group', { name: 'New Session', exact: true }).waitFor({ state: 'hidden' })
|
||||
await page.keyboard.press('Escape')
|
||||
for (const colorScheme of ['light', 'dark'] as const) {
|
||||
await page.emulateMedia({ colorScheme })
|
||||
for (const width of [420, 264]) {
|
||||
const handle = (await page.locator('[data-side="sidebar"]').boundingBox())!
|
||||
await page.mouse.move(handle.x + handle.width / 2, 240)
|
||||
await page.mouse.down()
|
||||
await page.mouse.move(width, 240, { steps: 10 })
|
||||
await page.mouse.up()
|
||||
await expect.poll(() => newSession.locator('kbd').allTextContents()).toEqual(keys.split(' '))
|
||||
const centerOffset = () => newSession.evaluate((element) => {
|
||||
const button = element.getBoundingClientRect()
|
||||
const content = element.querySelector('[class*="newSessionContent"]')!.getBoundingClientRect()
|
||||
return Math.abs(button.x + button.width / 2 - content.x - content.width / 2)
|
||||
})
|
||||
expect(await centerOffset()).toBeLessThan(1)
|
||||
const hintStyle = () => newSession.locator('[class*="newSessionShortcut"]').evaluate(element => ({
|
||||
opacity: getComputedStyle(element).opacity, mask: getComputedStyle(element.previousElementSibling!).maskImage,
|
||||
}))
|
||||
expect(await hintStyle()).toEqual({ opacity: '0', mask: 'none' })
|
||||
await newSession.hover()
|
||||
expect(await centerOffset()).toBeLessThan(1)
|
||||
const mask = await newSession.locator('[class*="newSessionLabelMask"]').boundingBox()
|
||||
const hint = await newSession.locator('[class*="newSessionShortcut"]').boundingBox()
|
||||
expect(mask!.x + mask!.width).toBeLessThanOrEqual(hint!.x + 1)
|
||||
expect((await hintStyle()).opacity).toBe('1')
|
||||
expect((await hintStyle()).mask).toContain('linear-gradient')
|
||||
await newSession.screenshot({ path: fileURLToPath(new URL(`../../../.artifacts/new-session-${process.pid}-${platform}-${colorScheme}-${width}.png`, import.meta.url)) })
|
||||
expect(await page.getByRole('tooltip').count()).toBe(0)
|
||||
await page.mouse.move(700, 100)
|
||||
expect(await hintStyle()).toEqual({ opacity: '0', mask: 'none' })
|
||||
await newSession.focus()
|
||||
await page.keyboard.press('Shift+Tab')
|
||||
await page.keyboard.press('Tab')
|
||||
expect(await newSession.evaluate(element => element.matches(':focus-visible'))).toBe(true)
|
||||
expect((await hintStyle()).opacity).toBe('1')
|
||||
expect(await page.getByRole('tooltip').count()).toBe(0)
|
||||
await newSession.evaluate((element) => { element.blur() })
|
||||
}
|
||||
}
|
||||
} finally { await context.close() }
|
||||
})
|
||||
|
||||
it.each([
|
||||
{ platform: 'Win32', modifier: 'Control', defaultBinding: 'Control+Alt+B' },
|
||||
{ platform: 'MacIntel', modifier: 'Meta', defaultBinding: 'Alt+Meta+B' },
|
||||
@@ -371,7 +429,8 @@ describe('web e2e: shortcut reference', () => {
|
||||
await other.goto(scaffold.authenticatedUrl, { waitUntil: 'load' })
|
||||
await other.getByRole('button', { name: 'Settings', exact: true }).waitFor()
|
||||
await other.keyboard.press(referenceKey)
|
||||
await other.getByRole('button', { name: 'Remove shortcut for Toggle left sidebar', exact: true }).click()
|
||||
await other.getByRole('button', { name: 'Edit shortcut for Toggle left sidebar', exact: true }).click()
|
||||
await other.getByRole('button', { name: 'Remove', exact: true }).click()
|
||||
await editor.getByText('Shortcut configuration or available commands changed. Review the latest bindings before saving.', { exact: true }).waitFor()
|
||||
await page.bringToFront()
|
||||
await editor.getByRole('button', { name: 'Press a shortcut', exact: true }).focus()
|
||||
|
||||
@@ -1176,8 +1176,9 @@ describe('web e2e: shipped right Sidebar', () => {
|
||||
}
|
||||
expect(await terminalEntry.evaluate(node => getComputedStyle(node).overflow)).toBe('hidden')
|
||||
const terminalActions = terminalEntry.getByRole('button')
|
||||
for (const action of await terminalActions.all()) {
|
||||
expect(await action.evaluate(node => getComputedStyle(node).borderRadius)).toBe('0px')
|
||||
const terminalButtons = await terminalActions.all()
|
||||
for (const [index, action] of terminalButtons.entries()) {
|
||||
expect(await action.evaluate(node => getComputedStyle(node).borderRadius)).toBe(index === 0 ? '0px' : '4px')
|
||||
await action.hover()
|
||||
expect(await action.evaluate(node => getComputedStyle(node).backgroundColor)).not.toBe('rgba(0, 0, 0, 0)')
|
||||
}
|
||||
|
||||
@@ -341,9 +341,10 @@ describe.skipIf(process.platform === 'win32')('Web sidebar terminal', () => {
|
||||
const entry = page.locator('[data-sidebar-right-guide-entry="terminal"]')
|
||||
await page.locator('[data-sidebar-right-guide]').screenshot({ path: `${shots}/terminal-guide.png`, animations: 'disabled' })
|
||||
const selector = entry.getByRole('button', { name: 'Choose shell', exact: true })
|
||||
const cardBox = (await entry.boundingBox())!
|
||||
const titleBox = (await entry.getByText('New terminal', { exact: true }).boundingBox())!
|
||||
const triggerBox = (await selector.boundingBox())!
|
||||
expect(Math.abs(cardBox.x + cardBox.width - triggerBox.x - triggerBox.width)).toBeLessThanOrEqual(2)
|
||||
expect(triggerBox.x).toBeGreaterThanOrEqual(titleBox.x + titleBox.width)
|
||||
expect(triggerBox.x - titleBox.x - titleBox.width).toBeLessThan(8)
|
||||
await page.emulateMedia({ colorScheme: 'dark' })
|
||||
await selector.click()
|
||||
await page.getByRole('menuitem', { name: 'bash', exact: true }).waitFor()
|
||||
|
||||
Reference in new issue
Block a user