Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoAction - the flow with custom agent #100

Open
phodal opened this issue Mar 7, 2024 · 16 comments
Open

AutoAction - the flow with custom agent #100

phodal opened this issue Mar 7, 2024 · 16 comments
Assignees
Labels
enhancement New feature or request

Comments

@phodal
Copy link
Member

phodal commented Mar 7, 2024

aka AutoFlow

@phodal phodal self-assigned this Mar 7, 2024
phodal added a commit that referenced this issue Mar 20, 2024
…ompletion #100

- Added new CustomCommand class to handle custom commands with name, content, and icon.
- Modified DevInIcons to include a new icon for custom commands.
- Created CustomCommandCompletion class to provide completion for custom commands.
- Extended DevInCompletionContributor to include custom commands in completion.
phodal added a commit that referenced this issue Mar 20, 2024
Renamed and reorganized language provider classes into a dedicated package for better organization and maintainability.
phodal added a commit that referenced this issue Mar 20, 2024
Add support for custom commands in the data provider, allowing the compiler to use custom commands defined in the project. This enables the DevInsCompiler to compile custom commands and integrate them into the output.
phodal added a commit that referenced this issue Mar 20, 2024
…onProfileState #100

Import RunContentManager and use it to manage run content descriptors. Also, add executor and runner parameters to the run method for proper execution.
phodal added a commit that referenced this issue Mar 20, 2024
Add message filtering to console output to improve readability and user experience. Include ProcessAdapter for text available event and ConsoleViewWrapperBase for the console. Add a message filter to the console for applying custom filtering logic to the output.
phodal added a commit that referenced this issue Mar 21, 2024
Remove unnecessary log statements for debugging.
The logs have been removed from AutoDevCommandRunner and DevInsRunConfigurationProfileState
phodal added a commit that referenced this issue Mar 21, 2024
Ensure patch execution consistency by wrapping in invokeLater to avoid race condition.

The commit fixes a race condition in the patch execution process by wrapping the execution logic in `invokeLater`, ensuring consistency and avoiding potential conflicts.
phodal added a commit that referenced this issue Mar 21, 2024
Added AgentToolOverviewCompletion for DevIns language code completion. Replaced AgentToolLibraryCompletion with new class to provide completions for agents and commands in DevIns language code. Added ToolHub enum to manage types of completions and customized completion behavior accordingly.
phodal added a commit that referenced this issue Mar 21, 2024
…100

- Added support for dynamic file names in the FILE_FUNC command by importing FileFunc and using its values to dynamically generate the description.
- Also added new files for various tool examples: write, symbol, rev, file, commit, shell, run, patch, and file-func.
phodal added a commit that referenced this issue Mar 21, 2024
Renamed and moved files and packages to more meaningful locations to improve code organization and maintainability.
phodal added a commit that referenced this issue Mar 21, 2024
This commit renames and reorganizes the data provider packages for more clear and organized structure.
phodal added a commit that referenced this issue Mar 21, 2024
Add support for ToolHubVariable in DevInsCompiler and ToolHubVariable.kt. ToolHubVariable now provides a lookup function to retrieve a list of agents or commands based on the variable name.
phodal added a commit that referenced this issue Mar 21, 2024
Updating the property names of ToolHubVariable to better reflect their purpose and usage. Also, adjusting the lookup method to handle the new property names and provide more descriptive output in the AgentToolOverviewCompletion class.
phodal added a commit that referenced this issue Mar 21, 2024
Add atomic reference and use invokeAndWait to ensure proper asynchronous execution, preventing race conditions.

This commit fixes an issue in DevInsProgramRunner where asynchronous execution could result in race conditions. By adding an atomic reference and using invokeAndWait, the asynchronous execution is now handled in a thread-safe manner.
phodal added a commit that referenced this issue Mar 21, 2024
…100

Add DevInsRunListener to handle run finish events in DevInsProgramRunner and DevInsRunConfigurationProfileState.

The `DevInsRunListener` interface is added to handle run finish events in `DevInsProgramRunner` and `DevInsRunConfigurationProfileState`. This listener will allow for better control and handling of events related to program execution.
phodal added a commit that referenced this issue Mar 22, 2024
Add methods to create tasks and temporary task files for DevIns language processing.

- Added `createTasks` method to generate a list of DevInFile objects based on input and output.
- Added `createTempTaskFile` method to generate a temporary DevInFile for tasks.
phodal added a commit that referenced this issue Mar 22, 2024
Add support for single-line comments in DevIns language grammar and parser.

This commit modifies the DevInParser.bnf and DevInLexer.flex files to include the COMMENTS token and handle single-line comments. It also adds a new test case for single-line comments in DevInParsingTest.kt.
phodal added a commit that referenced this issue Mar 22, 2024
…100

Add support for highlighting single-line comments in DevIns language syntax highlighter. This change sets the text attributes for comments to the color defined for line comments.
phodal added a commit that referenced this issue Mar 22, 2024
Add support for single-line comments in DevInsCommenter.kt and update DevInLexer.flex to handle comments properly.

This commit adds the necessary code to support single-line comments in the DevInsCommenter.kt file and updates the DevInLexer.flex file to handle comments properly. This enhancement allows the DevIns language to recognize and process single-line comments.
phodal added a commit that referenced this issue Mar 22, 2024
The commit modifies the file DevInsSettingsEditor.kt to improve the file selection message by creating a separate variable for the message and using it in the addBrowseFolderListener method. This change enhances code readability and maintainability.
@phodal phodal closed this as completed in 89ba45a Mar 22, 2024
phodal added a commit that referenced this issue Mar 22, 2024
…tion #100

- Updated runFinish method signature in DevInsRunListener to include scriptPath parameter for better functionality. Also added a new method lookupFlagComment in DevInsFlowProcessor for flag comment lookup.
phodal added a commit that referenced this issue Mar 22, 2024
#100

- Improve file content extraction to handle line ranges more accurately and efficiently.

The changes in `FileInsCommand.kt` allow for more precise extraction of file content based on line ranges, enhancing the accuracy and efficiency of the process. Additionally, in `DevInsCompiler.kt`, a new case for handling comments has been added to ignore comments during processing. Lastly, in `DevInsFlowProcessor.kt`, the usage of `runReadAction` has been added to ensure safe access to the PSI file.
phodal added a commit that referenced this issue Mar 22, 2024
- Refactored conversation service to use a map for cached conversations and added methods to update compiled result, API response, and IDE output. Also refactored the compiler to use a map for cached compile results and updated the return type of the compile method.
phodal added a commit that referenced this issue Mar 22, 2024
- Refactored createConversation method to accept result object instead of input string and script path, and updated related methods to reflect the change. Added tryReRun method to handle re-running conversations.

This commit improves the conversation service and compiler by refactoring the createConversation method to accept a result object instead of an input string and script path. It also adds a tryReRun method to handle re-running conversations.
phodal added a commit that referenced this issue Mar 26, 2024
…ion to RunnerResult class and refactor RunServiceTask to use them. This change simplifies the execution context management and improves code readability. #100
phodal added a commit that referenced this issue Mar 26, 2024
…hell scripts. This service simplifies the execution of shell commands within the DevIns IDE, enhancing the user experience. #100
phodal added a commit that referenced this issue Mar 27, 2024
…e lookup and create RunConfigurationSettings instance. This refactoring improves the readability and maintainability of the RunService class. #100
phodal added a commit that referenced this issue Mar 27, 2024
…hell scripts. This service simplifies the execution of shell commands within the DevIns IDE, enhancing the user experience. #100
phodal added a commit that referenced this issue Mar 27, 2024
…hell scripts. This service simplifies the execution of shell commands within the DevIns IDE, enhancing the user experience. #100
phodal added a commit that referenced this issue Mar 27, 2024
…ating run configurations. This enhancement allows for more targeted and efficient execution of tests within the DevIns IDE. #100
phodal added a commit that referenced this issue Mar 27, 2024
…d to be private and add support for creating run configurations from a PsiElement. #100
phodal added a commit that referenced this issue Mar 28, 2024
This commit introduces a new feature to the DevInLanguage plugin that allows for the retrieval of built-in command examples.
@Cha-Ching13
Copy link

I appreciate and support you! I'm not much help at coding but thank you for going hard

phodal added a commit that referenced this issue Mar 28, 2024
phodal added a commit that referenced this issue Mar 28, 2024
The document cleaning logic in the scrapy module has been refactored and improved.
@phodal phodal added the enhancement New feature or request label Mar 30, 2024
@ymli0215
Copy link
Contributor

@phodal
請問,Flow的功能還沒有實作 對嗎???

@phodal
Copy link
Member Author

phodal commented Apr 16, 2024

嗯,还不确定最后的形态

@ymli0215
Copy link
Contributor

ymli0215 commented Apr 16, 2024

想問一下Flow的用途

例如測試流程 : 取得針對整檔或是部分內容->產生junit test code -> write to file -> run test code
這些動作應該會透過 /file、/write、/run 連續去跑
這時候就是Flow希望做到的事情,對嗎??

@phodal
Copy link
Member Author

phodal commented Apr 16, 2024

对,当时设计的想法是这样的。

  1. AutoDev Pair - the advanced version AutoCRUD #79 生成对应的 tasking。类似于 AI 生成的任务规划
  2. AutoAction - the flow with custom agent  #100 这里执行对应的 action

所以,基本上这个 issue 算是完成了,只是没有测试过连贯性。

@ymli0215
Copy link
Contributor

但是你說 這個issue算是完成,但是沒有測試過連貫性,那是不是可以跟我說要怎樣測試,我試試看呢
agent 回傳

`` ` devin
[flow]:xxx.devin  
`` `

想要去呼叫我實體存在的xxx.devin,但看起來沒動靜

@phodal
Copy link
Member Author

phodal commented Apr 16, 2024

那可能是 bug 了,哈哈哈,因为调起来成本很高。

不对,这个功能只是设计好了,没实现:

DevInTypes.COMMENTS -> {
// ignore comment
}
else -> {
output.append(it.text)

@ymli0215
Copy link
Contributor

求實現... XD

phodal added a commit that referenced this issue Apr 16, 2024
@phodal
Copy link
Member Author

phodal commented Apr 16, 2024

@ymli0215 我提交了一个简单的实现上去,你先试试。剩下的只能以后再做了

@ymli0215
Copy link
Contributor

回報一下

透過對話視窗 flow簡單測試成功

用 單獨.devin檔案去執行flow就沒有效果,我這邊找找看問題是啥,看看有沒有可能我可以知道怎樣改...XD

@phodal
Copy link
Member Author

phodal commented Apr 16, 2024

看看 DevInsCompile 里的 compile 的调用方,应该是漏了一个

@ymli0215
Copy link
Contributor

針對DevInsProcessProcessor 加上你的做法就可以了

@ymli0215
Copy link
Contributor

請問一下

我透過agent回傳
` devin [Flow]:flow/test.devin `

test.devin目前內容 是不是還不能再去呼叫另一個agent??
我在test.devin有寫 @test ,但是她沒有去呼叫test agent

這是不是我曾問過,你預期agent只會呼叫一次,因此沒辦法觸發??? 畢竟這樣連續行為算同一個thread?


另外請問,是可以做複合動作的嗎
例如我想要在一個 .devin檔案中寫
generate junit test code for /file:aaa.java
/write:test.java <- 希望把上述產生的結果寫入test.java內

@phodal
Copy link
Member Author

phodal commented Apr 17, 2024

现在应该是不支持 devin flow 间的信息传递的。

原始版本的 DevIns Flow 设计是这样的:

假设当前是 action_1.devin

[flow]:flow/action_2.devin

xxx action 1

默认的设计应该是:

  1. 当你执行完现在的 flow,即:action_1.devin
  2. 在结束后会检查是 comments 里的内容,即 [flow]:flow/action_2.devin
  3. 执行 action_2.devin 中的内容

理论上,如果 action_2.devin 不执行 agent 的话,可能是个 bug ??

PS:預期 agent 只呼叫一次是在 chat panel 中的行为,如果是单独的 .devin 文件,可能是会执行的 —— 待确定。

@ymli0215
Copy link
Contributor

我現在測試 A.devin(透過agent呼叫B.devin) -> B.devin(透過agent呼叫C.devin) -> C.devin (/write)
但是C.devin沒有被呼叫寫檔

這邊我試著看看是哪裡的原因再來回報

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

3 participants