Skip to content

Commit

Permalink
docs about tabnine chat
Browse files Browse the repository at this point in the history
  • Loading branch information
shuxiao9058 committed Aug 1, 2023
1 parent b3e8db3 commit f802c3d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
17 changes: 15 additions & 2 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ An unofficial TabNine(with TabNine Chat supported) package for Emacs.
[[file:./assets/screenshot-2.png]]
@@html:</details>@@

* Installation
* Setup

** Installation

*** Install TabNine package

TabNine is available on [[https://melpa.org/#/tabnine][Melpa]], you can install it with your favorite package manager.

Expand Down Expand Up @@ -168,9 +172,18 @@ dotspacemacs-additional-packages
#+end_src
@@html:</details>@@


*** Install TabNine binary

After install TabNine package, you should execute =tabnine-install-binary= interactive command to install Tabnine binary to finish installation.

** TabNine configuration

The advanced features(eg: advanced completions, TabNine Chat) requires a =TabNine Pro= account, open TabNine Hub page with =tabnine-configuration= after installation. Then login with your account.

** TabNine Chat

TabNine Chat is still in BETA - to join the BETA - send =Tabnine Pro= email to [email protected]= to join BETA test.
TabNine Chat is still in BETA - to join the BETA - send =Tabnine Pro= email to [email protected]= to join BETA, while chat fails you can try with vscode to see whether the beta feature is available, also you can view you account's capabilities with =tabnine-capabilities= function.

| Command | Prompt |
|-------------------------------------+-----------------------------------------------|
Expand Down
4 changes: 4 additions & 0 deletions tabnine-core.el
Original file line number Diff line number Diff line change
Expand Up @@ -519,11 +519,15 @@ REQUEST should be JSON-serializable object."

(defun tabnine-capabilities ()
"Query TabNine server Capabilities."
(interactive)
(when-let* ((response (tabnine--request 'capabilities))
(enabled-features (plist-get response :enabled_features)))
(seq-doseq (feature enabled-features)
(when (equal feature "plugin.feature.tabnine_chat")
(setq tabnine--chat-enabled t)))
(when (called-interactively-p 'interactive)
(unless tabnine--chat-enabled
(user-error "TabNine Chat feature is not available")))
response))

(defun tabnine-state ()
Expand Down

0 comments on commit f802c3d

Please sign in to comment.