diff --git a/.gitignore b/.gitignore index c68a70d..0e7a59b 100644 --- a/.gitignore +++ b/.gitignore @@ -181,4 +181,3 @@ workspace/ # Private Config config/config.toml - diff --git a/desktop/README.md b/desktop/README.md index e384dd4..6b44fc0 100644 --- a/desktop/README.md +++ b/desktop/README.md @@ -53,7 +53,7 @@ nodejs: https://nodejs.org/en To run the project: cd .\desktop - wails dev + wails dev To start the backend service: @@ -69,7 +69,3 @@ To build the application: wails build The built application will be located in the project’s dist directory. - - - - diff --git a/desktop/README_zh.md b/desktop/README_zh.md index 608047b..8e1fe93 100644 --- a/desktop/README_zh.md +++ b/desktop/README_zh.md @@ -53,7 +53,7 @@ nodejs官网安装: https://nodejs.org/en 运行项目: cd .\desktop - wails dev + wails dev 启动服务端: @@ -69,7 +69,3 @@ nodejs官网安装: https://nodejs.org/en wails build 构建好的应用在项目dist目录下 - - - - diff --git a/desktop/app.go b/desktop/app.go index af53038..e796dcc 100644 --- a/desktop/app.go +++ b/desktop/app.go @@ -1,6 +1,7 @@ package main import ( + "OpenManus/src/utils" "context" "fmt" ) @@ -10,6 +11,12 @@ type App struct { ctx context.Context } +type File struct { + Result string `json:"result"` + Error string `json:"error"` + Callbackid string `json:"callbackid"` +} + // NewApp creates a new App application struct func NewApp() *App { return &App{} @@ -25,3 +32,11 @@ func (a *App) startup(ctx context.Context) { func (a *App) Greet(name string) string { return fmt.Sprintf("Hello %s, It's show time!", name) } + +// ReadAll reads file content +func (a *App) ReadAll(filePath string) string { + // Read the file content, resulting in a JSON string containing file content and callback ID + data := string(utils.ReadAll(filePath)) + utils.Log("ReadAll data: ", data) + return data +} diff --git a/desktop/frontend/index.html b/desktop/frontend/index.html index 7735a74..b6c943e 100644 --- a/desktop/frontend/index.html +++ b/desktop/frontend/index.html @@ -10,4 +10,3 @@ - diff --git a/desktop/frontend/src/App.vue b/desktop/frontend/src/App.vue index 94ff9f8..ccf80a0 100644 --- a/desktop/frontend/src/App.vue +++ b/desktop/frontend/src/App.vue @@ -1,5 +1,5 @@ diff --git a/desktop/frontend/src/views/config/Llm.vue b/desktop/frontend/src/views/config/Llm.vue index bf659d4..d6e613b 100644 --- a/desktop/frontend/src/views/config/Llm.vue +++ b/desktop/frontend/src/views/config/Llm.vue @@ -3,30 +3,222 @@ + + +
{{ t('noData') }}
+ + +
+
+ model: + {{ llmConfig.model }} +
+ +
+ base_url: + {{ llmConfig.base_url }} +
+ +
+ api_key: + {{ llmConfig.api_key }} +
+ +
+ max_tokens: + {{ llmConfig.max_tokens }} +
+ +
+ temperature: + {{ llmConfig.temperature }} +
+
+ + + +
+
+ model: + + + +
+ +
+ base_url: + + + +
+ +
+ api_key: + + + +
+ +
+ max_tokens: + + + +
+ +
+ temperature: + + + +
+ +
+ {{ t('cancel') }} + {{ t('submit') }} +
+
+
diff --git a/desktop/frontend/src/views/main/Task.vue b/desktop/frontend/src/views/main/Task.vue deleted file mode 100644 index 971b049..0000000 --- a/desktop/frontend/src/views/main/Task.vue +++ /dev/null @@ -1,408 +0,0 @@ - - - - - diff --git a/desktop/frontend/src/views/task/HistoryIndex.vue b/desktop/frontend/src/views/task/HistoryIndex.vue new file mode 100644 index 0000000..24a0f97 --- /dev/null +++ b/desktop/frontend/src/views/task/HistoryIndex.vue @@ -0,0 +1,237 @@ + + + + + diff --git a/desktop/frontend/src/views/main/Home.vue b/desktop/frontend/src/views/task/Home.vue similarity index 99% rename from desktop/frontend/src/views/main/Home.vue rename to desktop/frontend/src/views/task/Home.vue index 6bcf59d..9d93795 100644 --- a/desktop/frontend/src/views/main/Home.vue +++ b/desktop/frontend/src/views/task/Home.vue @@ -1,4 +1,4 @@ -