@@ -65,12 +65,12 @@ Must be a valid model supported by server, check `eca-chat-select-model`."
6565
6666(defface eca-chat-context-unlinked-face
6767 '((t (:foreground " gold" )))
68- " Face for the `eca-chat-context-prefix` ."
68+ " Face for contexts to be added ."
6969 :group 'eca )
7070
71- (defface eca-chat-context-linked -face
72- '((t (:inherit eca-chat-context-unlinked-face :underline t )))
73- " Face for the `eca-chat-context-prefix` ."
71+ (defface eca-chat-context-file -face
72+ '((t (:foreground " coral " :underline t )))
73+ " Face for contexts of file type ."
7474 :group 'eca )
7575
7676(defface eca-chat-user-messages-face
@@ -123,12 +123,12 @@ Must be a valid model supported by server, check `eca-chat-select-model`."
123123
124124(defvar eca-chat-mode-map
125125 (let ((map (make-sparse-keymap )))
126- (define-key map (kbd " <backspace>" ) #'eca-chat--backward-delete-char )
127- (define-key map (kbd " DEL" ) #'eca-chat--backward-delete-char )
128- (define-key map (kbd " S-<return>" ) #'eca-chat--send -newline )
129- (define-key map (kbd " S-<return>" ) #'eca-chat--send -newline )
126+ (define-key map (kbd " <backspace>" ) #'eca-chat--key-pressed-backspace )
127+ (define-key map (kbd " DEL" ) #'eca-chat--key-pressed-backspace )
128+ (define-key map (kbd " S-<return>" ) #'eca-chat--key-pressed -newline )
129+ (define-key map (kbd " S-<return>" ) #'eca-chat--key-pressed -newline )
130130 (define-key map (kbd " C-k" ) #'eca-chat-clear )
131- (define-key map (kbd " <return>" ) #'eca-chat--send -return )
131+ (define-key map (kbd " <return>" ) #'eca-chat--key-pressed -return )
132132 map)
133133 " Keymap used by `eca-chat-mode' ." )
134134
@@ -184,7 +184,7 @@ Must be a valid model supported by server, check `eca-chat-select-model`."
184184 (eca-chat--insert-prompt-string)
185185 (eca-chat--refresh-context)))
186186
187- (defun eca-chat--send -newline ()
187+ (defun eca-chat--key-pressed -newline ()
188188 " Insert a newline character at point."
189189 (interactive )
190190 (when (eq (line-beginning-position ) (eca-chat--prompt-field-start-point))
@@ -203,7 +203,7 @@ Must be a valid model supported by server, check `eca-chat-select-model`."
203203 (overlays-in (point-min ) (point-max )))
204204 (overlay-start )))
205205
206- (defun eca-chat--backward-delete-char ()
206+ (defun eca-chat--key-pressed-backspace ()
207207 " Delete the character before point, unless at the prompt or context boundary.
208208Checks if it's in a context, removing it if so.
209209This is similar to `backward-delete-char' but protects the prompt/context line."
@@ -232,7 +232,7 @@ This is similar to `backward-delete-char' but protects the prompt/context line."
232232
233233 (t (delete-char -1 )))))
234234
235- (defun eca-chat--send -return ()
235+ (defun eca-chat--key-pressed -return ()
236236 " Send the current prompt to eca process if in prompt."
237237 (interactive )
238238 (let* ((prompt-start (eca-chat--prompt-field-start-point))
@@ -338,12 +338,12 @@ This is similar to `backward-delete-char' but protects the prompt/context line."
338338 (" file" (let ((text (concat eca-chat-context-prefix (f-filename value))))
339339 (insert (propertize text
340340 'eca-chat-context-item context
341- 'font-lock-face 'eca-chat-context-linked -face ))
341+ 'font-lock-face 'eca-chat-context-file -face ))
342342 (insert " " )))
343343 (" directory" (let ((text (concat eca-chat-context-prefix (f-filename value))))
344344 (insert (propertize text
345345 'eca-chat-context-item context
346- 'font-lock-face 'eca-chat-context-linked -face ))
346+ 'font-lock-face 'eca-chat-context-file -face ))
347347 (insert " " ))))))
348348 (insert (propertize eca-chat-context-prefix 'font-lock-face 'eca-chat-context-unlinked-face ))))
349349
0 commit comments