Skip to content

Commit 5c62d37

Browse files
committed
Droid: use native acp client and support default model and mode
1 parent e06e65f commit 5c62d37

File tree

2 files changed

+39
-7
lines changed

2 files changed

+39
-7
lines changed

README.org

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,13 @@ See https://github.com/mistralai/mistral-vibe for details.
133133

134134
*** Factory Droid
135135

136-
For Factory Droid, install the =droid-acp= client:
136+
For Factory Droid, install Droid:
137137

138138
#+begin_src bash
139-
npm install -g droid-acp
139+
curl -fsSL https://app.factory.ai/cli | sh
140140
#+end_src
141141

142-
See https://github.com/yaonyan/droid-acp for details.
142+
See https://factory.ai for details.
143143

144144
*** Pi
145145

agent-shell-droid.el

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
;;; Commentary:
2222
;;
2323
;; This file includes Factory Droid specific configurations relying on the
24-
;; droid-acp client: https://github.com/yaonyan/droid-acp
24+
;; droid: https://docs.factory.ai/cli/getting-started/quickstart
2525
;;
2626

2727
;;; Code:
@@ -73,8 +73,35 @@ For no authentication (e.g., using `droid-acp` built-in login):
7373
:type 'alist
7474
:group 'agent-shell)
7575

76+
(defcustom agent-shell-droid-default-model-id
77+
nil
78+
"Default Droid AI model ID.
79+
80+
Must be one of the model ID's displayed under \"Available models\"
81+
when starting a new shell."
82+
:type '(choice (const nil) string)
83+
:group 'agent-shell)
84+
85+
(defcustom agent-shell-droid-default-session-mode-id
86+
nil
87+
"Default Droid AI session mode ID.
88+
89+
Must be one of the mode ID's displayed under \"Available modes\"
90+
when starting a new shell."
91+
:type '(choice (const nil) string)
92+
:group 'agent-shell)
93+
94+
(defcustom agent-shell-droid-default-reasoning-effort
95+
nil
96+
"Default reasoning effort.
97+
98+
It can be one of the followings.
99+
none, dynamic, off, minimal, low, medium, high, xhigh, max"
100+
:type '(choice (const nil) string)
101+
:group 'agent-shell)
102+
76103
(defcustom agent-shell-droid-acp-command
77-
'("droid-acp")
104+
(list "droid" "exec" "--output-format" "acp")
78105
"Command and parameters for the Factory Droid ACP client.
79106
80107
The first element is the command name, and the rest are command parameters."
@@ -111,7 +138,9 @@ Returns an agent configuration alist using `agent-shell-make-agent-config'."
111138
:welcome-function #'agent-shell-droid--welcome-message
112139
:client-maker (lambda (buffer)
113140
(agent-shell-droid-make-client :buffer buffer))
114-
:install-instructions "See https://github.com/yaonyan/droid-acp for installation."))
141+
:default-model-id (lambda () agent-shell-droid-default-model-id)
142+
:default-session-mode-id (lambda () agent-shell-droid-default-session-mode-id)
143+
:install-instructions "See https://docs.factory.ai/cli/getting-started/quickstart for installation."))
115144

116145
(defun agent-shell-droid-start-agent ()
117146
"Start an interactive Factory Droid agent shell."
@@ -129,7 +158,10 @@ Uses `agent-shell-droid-authentication' for authentication configuration."
129158
(user-error "Please migrate to use agent-shell-droid-acp-command and eval (setq agent-shell-droid-command nil)"))
130159
(let ((api-key (agent-shell-droid-key)))
131160
(agent-shell--make-acp-client :command (car agent-shell-droid-acp-command)
132-
:command-params (cdr agent-shell-droid-acp-command)
161+
:command-params (append (seq-rest agent-shell-droid-acp-command)
162+
(when agent-shell-droid-default-reasoning-effort
163+
(list "--reasoning-effort"
164+
agent-shell-droid-default-reasoning-effort)))
133165
:environment-variables (append (cond ((map-elt agent-shell-droid-authentication :none)
134166
nil)
135167
(api-key

0 commit comments

Comments
 (0)