Skip to content

Commit b97d50d

Browse files
authored
Merge pull request #67 from sdoyle88/master
fix: nil description in mcp cause completion to fail
2 parents fe0f6c2 + 84b1197 commit b97d50d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

eca-chat.el

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,11 +1289,13 @@ If STATIC? return strs with no dynamic values."
12891289
(eca-chat--relativize-filename-for-workspace-root path roots 'hide-filename)))
12901290

12911291
(defun eca-chat--completion-prompts-annotate (item-label)
1292-
"Annonate prompt ITEM-LABEL."
1293-
(-let (((&plist :description description :arguments args) (get-text-property 0 'eca-chat-completion-item item-label)))
1292+
"Annotate prompt ITEM-LABEL."
1293+
(-let (((&plist :description description :arguments args)
1294+
(get-text-property 0 'eca-chat-completion-item item-label)))
12941295
(concat "(" (string-join (--map (plist-get it :name) args) ", ")
12951296
") "
1296-
(truncate-string-to-width description (* 100 eca-chat-window-width)))))
1297+
(when description
1298+
(truncate-string-to-width description (* 100 eca-chat-window-width))))))
12971299

12981300
(defun eca-chat--completion-context-from-new-context-exit-function (item _status)
12991301
"Add to context the selected ITEM."

0 commit comments

Comments
 (0)