feature: not always open new window #31
Open
+57
−30
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
在之前的版本中,
web_search
和export_file
工具会总是打开新窗口,这个 PR 修改了一部分代码,让着两个工具可以在已有的窗口进行操作。这个 PR 还对
Eko
类增加了一个可选的ekoConfig
参数,其中的alwaysOpenNewWindow
字段可以决定是否总是在新窗口打开。然而,当我尝试把代码加载到浏览器插件时出现了问题。当我尝试 prompt
Search Sam Altman's information and summarize it into markdown format for export
时,在 popup 窗口的 console 总是会在开头打印ekoConfig: undefined
。这看起来是Eko.constructor()
打印的,提示浏览器插件的相关代码在调用 Eko 框架时出现了不兼容的情况。由于我对于浏览器插件的代码并不熟悉,所以请求对这块业务熟悉的人拉取这个 PR 的代码进行调试。
In previous versions, the
web_search
andexport_file
tools would always open new windows. This pull request (PR) modifies part of the code to allow these two tools to operate within existing windows.Additionally, this PR introduces an optional
ekoConfig
parameter to theEko
class, which includes analwaysOpenNewWindow
field that determines whether to always open a new window.However, issues arose when I tried to load the code into the browser extension. When I attempted to prompt with "Search Sam Altman's information and summarize it into markdown format for export," the console in the popup window always printed
ekoConfig: undefined
at the beginning. It seems that this was printed byEko.constructor()
, suggesting an incompatibility in the browser extension's relevant code when calling the Eko framework.Since I am not familiar with the code for browser extensions, I request that someone who is familiar with this area pull the code for this PR and debug it.