Skip to content

Commit ecf891e

Browse files
committed
feat(flow): add documentation and comments to TaskFlow interface #81
The TaskFlow interface in `TaskFlow.kt` has been updated to include documentation and comments for each method. This will improve code readability and provide better understanding of the purpose and functionality of each method. The `clarify()` method now returns a string representing the documentation for the class. The `design()` method now takes a context parameter and returns a string specifying the format for designing the task flow. The `execute()` method now includes a comment explaining its purpose and the expected result of the execution.
1 parent 4870af0 commit ecf891e

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

src/main/kotlin/cc/unitmesh/devti/flow/TaskFlow.kt

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,40 @@
11
package cc.unitmesh.devti.flow
22

3+
/**
4+
* AutoDev TaskFlow is the built-in Workflow for AutoDev, see in [#81](https://github.com/unit-mesh/auto-dev/issues/81)
5+
*/
36
interface TaskFlow {
7+
/**
8+
* This method is used to clarify the purpose of user's requirement.
9+
* It returns a string will specify format, will parse in design()
10+
* For example, tableNames in SQL:
11+
* ```markdown
12+
* [item1, item2, item3]
13+
* ```
14+
* @return A string representing the documentation for the class.
15+
*/
416
fun clarify(): String
17+
18+
/**
19+
* This method is used to ask LLM to design the tasking flow based on the given context.
20+
* It returns a string will specify format, will parse in execute()
21+
*
22+
* @param context The context for designing the task flow.
23+
*/
524
fun design(context: Any): String {
625
return ""
726
}
27+
28+
/**
29+
* Executes the last step of the task flow.
30+
*
31+
* Like:
32+
* - Execute SQL in [GenSqlFlow]
33+
* - Execute HTTP request in [GenHttpFlow]
34+
* - Execute shell command in [GenShellFlow]
35+
*
36+
* @return A string representing the result of the execution.
37+
*/
838
fun execute(): String {
939
return ""
1040
}

0 commit comments

Comments
 (0)