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
80107The 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