Skip to content

Commit 2541f97

Browse files
committed
Add type to chat command
1 parent 03dc628 commit 2541f97

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

docs/protocol.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,11 @@ interface ChatCommand {
769769
*/
770770
description: string;
771771

772+
/**
773+
* The type of this command
774+
*/
775+
type: 'mcp-prompt' | 'native';
776+
772777
/**
773778
* The arguments of the command.
774779
*/

src/eca/features/chat.clj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,9 +385,11 @@
385385
db*]
386386
(let [mcp-prompts (->> (f.mcp/all-prompts @db*)
387387
(mapv #(-> %
388-
(assoc :name (str (:server %) ":" (:name %)))
388+
(assoc :name (str (:server %) ":" (:name %))
389+
:type :mcpPrompt)
389390
(dissoc :server))))
390391
eca-commands [{:name "costs"
392+
:type :native
391393
:description "Show the total costs of the current chat session."
392394
:arguments []}]
393395
commands (concat mcp-prompts

0 commit comments

Comments
 (0)