mirror of
https://github.com/carlrobertoh/ProxyAI.git
synced 2026-05-10 12:10:14 +00:00
feat: web search support (#641)
* feat: web search support * fix: enable web search only for codegpt provider * fix: checkstyle * feat: improve list cell design
This commit is contained in:
parent
1f28bc6217
commit
05f146c405
17 changed files with 290 additions and 77 deletions
|
|
@ -173,7 +173,8 @@ public class ChatToolWindowTabPanel implements Disposable {
|
|||
return new ResponsePanel()
|
||||
.withReloadAction(() -> reloadMessage(message, conversation, conversationType))
|
||||
.withDeleteAction(() -> removeMessage(message.getId(), conversation))
|
||||
.addContent(new ChatMessageResponseBody(project, true, this));
|
||||
.addContent(
|
||||
new ChatMessageResponseBody(project, true, false, message.isWebSearchIncluded(), this));
|
||||
}
|
||||
|
||||
private void reloadMessage(
|
||||
|
|
@ -244,7 +245,7 @@ public class ChatToolWindowTabPanel implements Disposable {
|
|||
requestHandler.call(callParameters);
|
||||
}
|
||||
|
||||
private Unit handleSubmit(String text) {
|
||||
private Unit handleSubmit(String text, boolean webSearchIncluded) {
|
||||
var message = new Message(text);
|
||||
var editor = EditorUtil.getSelectedEditor(project);
|
||||
if (editor != null) {
|
||||
|
|
@ -257,6 +258,7 @@ public class ChatToolWindowTabPanel implements Disposable {
|
|||
}
|
||||
}
|
||||
message.setUserMessage(text);
|
||||
message.setWebSearchIncluded(webSearchIncluded);
|
||||
sendMessage(message, ConversationType.DEFAULT);
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue