Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
freem
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Openai/691151cc-3da4-800f-9b7c-81b0e0d10369
(section)
Add languages
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Assistant: はい、基本的には合っています。 === はい、基本的には合っています。 ===== 1. <code>IContentAssistProcessor</code> を正しく実装 - computeCompletionProposals で AI の提案を CompletionProposal に変換している → 正しい - Tab キーで採用可能 ===== # 不要なメソッドもオーバーライド - computeContextInformation や自動起動文字などは必要に応じて null でOK # 挿入文字列・カーソル移動位置 - aiSuggestion をそのまま挿入文字列に使用 - aiSuggestion.length() でカーソル位置を末尾に移動 → 適切 ===== - このクラス単体では Content Assist ポップアップは表示されません。 表示するには、エディタの SourceViewerConfiguration で <code>getContentAssistProcessor</code> をオーバーライドして、この <code>AIAssistProcessor</code> を返す 必要があります。 ===== * AISuggestHandler と組み合わせる場合の流れ: 1. Ctrl+Shift+Z で AISuggestHandler が AI にリクエスト 2. AI が返した文字列をクリーン化 (extractCodeFromAIResponse) 3. AIAssistProcessor に渡す 4. SourceViewer の Content Assist を手動で開く、または自動でポップアップ 💡 補足 * 自動でポップアップ表示させたい場合は、ITextViewer から ContentAssistant.showPossibleCompletions() を呼ぶ方法があります。 * 現状の実装でも Tab で採用可能な CompletionProposal は正しく生成されています。 結論として、この AIAssistProcessor は 正しい実装で問題ありません。 希望であれば、AISuggestHandler と統合して Ctrl+Shift+Z → ポップアップ表示 → Tab で採用 の完全動作サンプルも提示できます。
Summary:
Please note that all contributions to freem are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 (see
Freem:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)