Skip to content

Commit 25da347

Browse files
committed
refactor: remove ai-assistant shortcuts and related actions
Removed references to the "ai-assistant" from keybinding configurations and system actions. This includes updates to the keybinding manager, id-name mapping, and system actions JSON file to streamline the keyboard shortcuts and improve overall clarity. Log: remove ai-assistant shortcuts and related actions pms: TASK-369021
1 parent 9e77c7e commit 25da347

6 files changed

Lines changed: 6 additions & 20 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require (
1111
github.com/godbus/dbus/v5 v5.1.0
1212
github.com/gosexy/gettext v0.0.0-20160830220431-74466a0a0c4a
1313
github.com/jouyouyun/hardware v0.1.8
14-
github.com/linuxdeepin/dde-api v0.0.0-20250515055156-b3908acc7af1
14+
github.com/linuxdeepin/dde-api v0.0.0-20250603084823-9f6196d55806
1515
github.com/linuxdeepin/go-dbus-factory v0.0.0-20250513130423-081e4e5aca69
1616
github.com/linuxdeepin/go-gir v0.0.0-20230710064042-bd15f0549c87
1717
github.com/linuxdeepin/go-lib v0.0.0-20250514064815-de7ec8f89a8a

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn
3232
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
3333
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
3434
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
35-
github.com/linuxdeepin/dde-api v0.0.0-20250515055156-b3908acc7af1 h1:DJKDkej1SKeVmHUTRW6P/YYUjUWmD8BVee0PDhBvlqo=
36-
github.com/linuxdeepin/dde-api v0.0.0-20250515055156-b3908acc7af1/go.mod h1:Ms92CRDOjzkDmX1x0x6+b0vQSYHJ7Ab9jQMY2JYWiio=
35+
github.com/linuxdeepin/dde-api v0.0.0-20250603084823-9f6196d55806 h1:MB+P88Freh09A1wKmrDbR2ZryElMxX1I7fz6E/f1Ono=
36+
github.com/linuxdeepin/dde-api v0.0.0-20250603084823-9f6196d55806/go.mod h1:Ms92CRDOjzkDmX1x0x6+b0vQSYHJ7Ab9jQMY2JYWiio=
3737
github.com/linuxdeepin/go-dbus-factory v0.0.0-20250513130423-081e4e5aca69 h1:fkdKGNucj9zg7P+C2OGYi/jDDReH9l8Pry0XKUi+YfM=
3838
github.com/linuxdeepin/go-dbus-factory v0.0.0-20250513130423-081e4e5aca69/go.mod h1:iIlTR50SA8MJ9ORPyMOpKWMF4g+AUorbER5AX0RD9Jk=
3939
github.com/linuxdeepin/go-gir v0.0.0-20230331033513-a8d7a9e89f9b/go.mod h1:a0tox5vepTQu5iO6rdKc4diGT+fkyXZlRROM8ULEvaI=

keybinding1/manager.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"crypto/sha256"
99
"encoding/hex"
1010
"encoding/json"
11+
1112
"github.com/linuxdeepin/go-lib/appinfo/desktopappinfo"
1213
"github.com/linuxdeepin/go-lib/strv"
1314

@@ -486,7 +487,6 @@ var kwinSysActionCmdMap = map[string]string{
486487
"Deepin Picker": "color-picker", // ctrl+alt+v
487488
"System Monitor": "system-monitor", // ctrl+alt+escape
488489
"Screen Recorder": "deepin-screen-recorder", // deepin-screen-recorder ctrl+alt+r
489-
"Desktop AI Assistant": "ai-assistant", // ai-assistant [<Super>Q]q
490490
"Text to Speech": "text-to-speech",
491491
"Speech to Text": "speech-to-text",
492492
"Clipboard": "clipboard",

keybinding1/shortcuts/id_name_map.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ func getSystemIdNameMap() map[string]string {
2929
"turn-off-screen": gettext.Tr("Fast Screen Off"),
3030
"system-monitor": gettext.Tr("System Monitor"),
3131
"color-picker": gettext.Tr("Deepin Picker"),
32-
"ai-assistant": gettext.Tr("Desktop AI Assistant"),
3332
"text-to-speech": gettext.Tr("Text to Speech"),
3433
"speech-to-text": gettext.Tr("Speech to Text"),
3534
"clipboard": gettext.Tr("Clipboard"),

keybinding1/shortcuts/shortcut_manager.go

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
"github.com/linuxdeepin/go-lib/gettext"
2222
"github.com/linuxdeepin/go-lib/keyfile"
2323
"github.com/linuxdeepin/go-lib/log"
24-
"github.com/linuxdeepin/go-lib/strv"
2524
dutils "github.com/linuxdeepin/go-lib/utils"
2625
x "github.com/linuxdeepin/go-x11-client"
2726
"github.com/linuxdeepin/go-x11-client/ext/record"
@@ -958,12 +957,7 @@ func (sm *ShortcutManager) CheckSystem(gsPlatform, gsEnable *gio.Settings, id st
958957
platformSet := arr2set(gsPlatform.ListKeys())
959958
enableSet := arr2set(gsEnable.ListKeys())
960959
sysType := strings.ToLower(systemType())
961-
assistiveToolsShortcut := []string{
962-
"ai-assistant",
963-
"speech-to-text",
964-
"text-to-speech",
965-
"translation",
966-
}
960+
967961
// 判断是否是支持的平台
968962
if platformSet[id] {
969963
plats := gsPlatform.GetStrv(id)
@@ -973,9 +967,6 @@ func (sm *ShortcutManager) CheckSystem(gsPlatform, gsEnable *gio.Settings, id st
973967
return false
974968
}
975969
}
976-
if sysType == "community" && strv.Strv(assistiveToolsShortcut).Contains(id) {
977-
return false
978-
}
979970

980971
// 判断是否配置开启
981972
if enableSet[id] && !gsEnable.GetBoolean(id) {

misc/dde-daemon/keybinding/system_actions.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,6 @@
6464
"Action": "sleep 0.5; xset dpms force off",
6565
"Key": "turn-off-screen"
6666
},
67-
{
68-
"Key": "ai-assistant",
69-
"Action": "dbus-send --print-reply --dest=com.iflytek.aiassistant /aiassistant/deepinmain com.iflytek.aiassistant.mainWindow.changeui"
70-
},
7167
{
7268
"Key": "text-to-speech",
7369
"Action": "/usr/share/uos-ai-assistant/shell/tts.sh"
@@ -82,7 +78,7 @@
8278
},
8379
{
8480
"Key": "translation",
85-
"Action": "dbus-send --print-reply --dest=com.iflytek.aiassistant /aiassistant/deepinmain com.iflytek.aiassistant.mainWindow.TextToTranslate"
81+
"Action": "/usr/share/uos-ai-assistant/shell/translation.sh"
8682
},
8783
{
8884
"key":"notification-center",

0 commit comments

Comments
 (0)