mirror of
https://github.com/carlrobertoh/ProxyAI.git
synced 2026-05-21 02:11:29 +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
2e5670fa29
commit
352fe78f59
17 changed files with 290 additions and 77 deletions
|
|
@ -174,7 +174,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(
|
||||
|
|
@ -245,7 +246,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) {
|
||||
|
|
@ -259,6 +260,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