opalacoder 0.1.4__tar.gz → 0.1.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {opalacoder-0.1.4 → opalacoder-0.1.6}/PKG-INFO +31 -11
- {opalacoder-0.1.4 → opalacoder-0.1.6}/README.md +27 -9
- {opalacoder-0.1.4 → opalacoder-0.1.6}/gui_src/src/App.jsx +1 -1
- {opalacoder-0.1.4 → opalacoder-0.1.6}/gui_src/src/index.css +1 -1
- {opalacoder-0.1.4 → opalacoder-0.1.6}/opalacoder/__init__.py +1 -1
- {opalacoder-0.1.4 → opalacoder-0.1.6}/opalacoder/cli.py +3 -0
- opalacoder-0.1.6/opalacoder/gui/assets/index-JnX7gh-E.css +32 -0
- opalacoder-0.1.4/opalacoder/gui/assets/index-DJeOys10.js → opalacoder-0.1.6/opalacoder/gui/assets/index-nW4YtdWC.js +1 -1
- {opalacoder-0.1.4 → opalacoder-0.1.6}/opalacoder/gui/index.html +2 -2
- {opalacoder-0.1.4 → opalacoder-0.1.6}/opalacoder/ide_server.py +2 -2
- {opalacoder-0.1.4 → opalacoder-0.1.6}/pyproject.toml +5 -2
- {opalacoder-0.1.4 → opalacoder-0.1.6}/requirements.txt +1 -1
- opalacoder-0.1.4/opalacoder/gui/assets/index-CZ4mgucw.css +0 -32
- {opalacoder-0.1.4 → opalacoder-0.1.6}/.claude/rules/RULES.md +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/.claude/settings.json +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/.github/workflows/publish.yml +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/.gitignore +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/AGENTS.md +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/CLAUDE.md +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/GEMINI.md +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/agents.yaml +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/config.yaml +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/debug/scratch_tail.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/docs/guide/analysis_results.md +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/docs/guide/figs/logotipo.png +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/docs/guide/paper_memplan.md +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/docs/guide/skills-plugin-system.md +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/docs/specs/01-arquitetura.md +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/docs/specs/02-memgpt-orquestrador.md +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/docs/specs/03-skill-implement-feature.md +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/docs/specs/04-memoria.md +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/docs/specs/05-vcs-sombra.md +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/docs/specs/06-skills-e-plugins.md +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/docs/specs/07-configuracao.md +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/docs/specs/08-ide.md +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/docs/specs/09-ide-projectcreationinterface.md +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/docs/specs/README.md +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/gui_src/index.html +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/gui_src/package-lock.json +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/gui_src/package.json +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/gui_src/src/main.jsx +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/gui_src/vite.config.js +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/main.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/opalacoder/agent_stdin.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/opalacoder/agents.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/opalacoder/api_keys.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/opalacoder/archival.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/opalacoder/cli_commands.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/opalacoder/code_index.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/opalacoder/config.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/opalacoder/copy_gui.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/opalacoder/embeddings.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/opalacoder/i18n.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/opalacoder/memgpt_runtime.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/opalacoder/orchestrator.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/opalacoder/planner.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/opalacoder/plugins/__init__.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/opalacoder/plugins/html_css_js_tools.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/opalacoder/project.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/opalacoder/session.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/opalacoder/skills.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/opalacoder/structured.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/opalacoder/terminal.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/opalacoder/terminal_manager.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/opalacoder/tools.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/opalacoder/vcs.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/opalacoder/vector_index.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/opalacoder/workflow_orchestrator.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/opalacoder/workflow_tools.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/pytest.ini +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/skills/chat-orchestrator/SKILL.md +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/skills/command-line/SKILL.md +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/skills/command-line/scripts/command_executor.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/skills/skills_store/html-css-js/SKILL.md +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/skills/skills_store/html-css-js/scripts/check_contracts.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/skills/skills_store/implement-feature/SKILL.md +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/skills/skills_store/implement-feature/scripts/run_workflow.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/tests/test_agent_config.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/tests/test_agent_stdin.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/tests/test_code_index_integration.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/tests/test_command_line_skill.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/tests/test_complexity_evaluator.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/tests/test_context_guard.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/tests/test_file_delete.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/tests/test_i18n_coverage.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/tests/test_implement_feature_script.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/tests/test_memgpt_runtime.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/tests/test_model_commands.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/tests/test_planner_oracle_live.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/tests/test_planner_output.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/tests/test_project_store.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/tests/test_refinement_loop.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/tests/test_search_bugs.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/tests/test_skills_directory_loader.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/tests/test_unhashable_dict_bug.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/tests/test_verification_strategies.py +0 -0
- {opalacoder-0.1.4 → opalacoder-0.1.6}/tests/test_workflow_pipeline.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: opalacoder
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.6
|
|
4
4
|
Summary: Autonomous coding agent with interactive planning and modular execution
|
|
5
5
|
Project-URL: Homepage, https://github.com/gilzamir/OpalaCoder
|
|
6
6
|
Project-URL: Bug Tracker, https://github.com/gilzamir/OpalaCoder/issues
|
|
@@ -15,13 +15,15 @@ Requires-Dist: chromadb>=0.4.0
|
|
|
15
15
|
Requires-Dist: instructor>=1.15.1
|
|
16
16
|
Requires-Dist: litellm>=1.40.0
|
|
17
17
|
Requires-Dist: numpy>=1.21.0
|
|
18
|
+
Requires-Dist: pyqt6>=6.0.0
|
|
18
19
|
Requires-Dist: python-dotenv>=1.0.0
|
|
19
20
|
Requires-Dist: pywebview>=4.0
|
|
20
21
|
Requires-Dist: pyyaml>=6.0
|
|
21
22
|
Requires-Dist: rich>=13.0.0
|
|
22
|
-
Requires-Dist: sentence-transformers>=3.0.0
|
|
23
23
|
Requires-Dist: tree-sitter-language-pack>=1.8.0
|
|
24
24
|
Requires-Dist: tree-sitter>=0.25.0
|
|
25
|
+
Provides-Extra: embeddings
|
|
26
|
+
Requires-Dist: sentence-transformers>=3.0.0; extra == 'embeddings'
|
|
25
27
|
Description-Content-Type: text/markdown
|
|
26
28
|
|
|
27
29
|
# OpalaCoder
|
|
@@ -56,7 +58,7 @@ OpalaCoder features an integrated desktop GUI built using React, Vite, and `pywe
|
|
|
56
58
|
- **Integrated Terminal**: Includes a real-time xterm.js terminal with shell/PTY integration for running and inspecting commands natively.
|
|
57
59
|
- **Git Source Control Sidebar**: A dedicated panel that tracks file modifications (color-coded as Modified/Untracked/Deleted) and provides a commit interface.
|
|
58
60
|
- **Global Settings Panel**: Customize the editor font size, tab size, and word wrapping, with dynamic toggle support for Light and Dark themes.
|
|
59
|
-
- **About Tab**: Version tracking (currently `0.1.
|
|
61
|
+
- **About Tab**: Version tracking (currently `0.1.6 alfa`), licensing, and developer details in the settings panel.
|
|
60
62
|
|
|
61
63
|
### 6. Persistent Projects and CLI Commands
|
|
62
64
|
|
|
@@ -96,19 +98,37 @@ opalacoder/
|
|
|
96
98
|
|
|
97
99
|
## Requirements
|
|
98
100
|
|
|
99
|
-
|
|
100
|
-
-
|
|
101
|
-
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
-
|
|
105
|
-
- Any model supported by [litellm](https://docs.litellm.ai) works
|
|
106
|
-
|
|
101
|
+
### 1. Core & CLI Requirements
|
|
102
|
+
- **Python 3.11+**
|
|
103
|
+
- **[agenticblocks](https://github.com/gilzamir/agenticblocks)** (install from source)
|
|
104
|
+
- **Local SQLite support** (standard in python)
|
|
105
|
+
- **Local LLM Engine (Recommended: Ollama 0.24.0+)** with models available:
|
|
106
|
+
- **Default & Alternative models**: `ministral-3:14b` (or `gemma4:latest`, `mistral-nemo:latest`)
|
|
107
|
+
- Any model supported by [litellm](https://docs.litellm.ai) works.
|
|
108
|
+
|
|
109
|
+
> [!TIP]
|
|
110
|
+
> **Hardware Acceleration & GPU Drivers:**
|
|
111
|
+
> To run large models (like `gemma4` or `ministral-3:14b`) efficiently on local backends (such as Ollama), it is highly recommended to use GPU hardware acceleration.
|
|
112
|
+
> - **NVIDIA GPUs**: Ensure you have official **NVIDIA Drivers** and the **CUDA Toolkit** installed so that Ollama can offload model layers to GPU VRAM.
|
|
113
|
+
> - **AMD & Apple Silicon**: Ollama also supports ROCm (AMD) and Metal (Apple Silicon) natively. Make sure your local setup is utilizing GPU acceleration to avoid slow CPU execution times.
|
|
114
|
+
|
|
115
|
+
### 2. Web IDE / GUI Requirements
|
|
116
|
+
- **Desktop Window Mode (Optional)**: Launches a native app window using `pywebview`.
|
|
117
|
+
- **Windows**: Works out of the box using Windows Webview2 (Edge).
|
|
118
|
+
- **Linux**: Requires **WebKit2GTK** python bindings (specifically `python3-gi` and `gir1.2-webkit2-4.1`) or **Qt5/Qt6** (PyQt/PySide) installed on the system.
|
|
119
|
+
- **Browser Fallback**: If desktop window dependencies are missing, OpalaCoder automatically starts the IDE server and opens it in your default web browser (`http://127.0.0.1:3000`).
|
|
120
|
+
- **Frontend Development (Optional)**: If you intend to compile the React/Vite frontend source code under `gui_src/`, you will need **Node.js 18+** and **npm**. (Compiled assets are already bundled in default packages).
|
|
107
121
|
|
|
108
122
|
---
|
|
109
123
|
|
|
110
124
|
## Installation
|
|
111
125
|
|
|
126
|
+
Try:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
pip install opalacoder
|
|
130
|
+
```
|
|
131
|
+
|
|
112
132
|
```bash
|
|
113
133
|
git clone https://github.com/gilzamir/OpalaCoder
|
|
114
134
|
cd OpalaCoder
|
|
@@ -30,7 +30,7 @@ OpalaCoder features an integrated desktop GUI built using React, Vite, and `pywe
|
|
|
30
30
|
- **Integrated Terminal**: Includes a real-time xterm.js terminal with shell/PTY integration for running and inspecting commands natively.
|
|
31
31
|
- **Git Source Control Sidebar**: A dedicated panel that tracks file modifications (color-coded as Modified/Untracked/Deleted) and provides a commit interface.
|
|
32
32
|
- **Global Settings Panel**: Customize the editor font size, tab size, and word wrapping, with dynamic toggle support for Light and Dark themes.
|
|
33
|
-
- **About Tab**: Version tracking (currently `0.1.
|
|
33
|
+
- **About Tab**: Version tracking (currently `0.1.6 alfa`), licensing, and developer details in the settings panel.
|
|
34
34
|
|
|
35
35
|
### 6. Persistent Projects and CLI Commands
|
|
36
36
|
|
|
@@ -70,19 +70,37 @@ opalacoder/
|
|
|
70
70
|
|
|
71
71
|
## Requirements
|
|
72
72
|
|
|
73
|
-
|
|
74
|
-
-
|
|
75
|
-
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
-
|
|
79
|
-
- Any model supported by [litellm](https://docs.litellm.ai) works
|
|
80
|
-
|
|
73
|
+
### 1. Core & CLI Requirements
|
|
74
|
+
- **Python 3.11+**
|
|
75
|
+
- **[agenticblocks](https://github.com/gilzamir/agenticblocks)** (install from source)
|
|
76
|
+
- **Local SQLite support** (standard in python)
|
|
77
|
+
- **Local LLM Engine (Recommended: Ollama 0.24.0+)** with models available:
|
|
78
|
+
- **Default & Alternative models**: `ministral-3:14b` (or `gemma4:latest`, `mistral-nemo:latest`)
|
|
79
|
+
- Any model supported by [litellm](https://docs.litellm.ai) works.
|
|
80
|
+
|
|
81
|
+
> [!TIP]
|
|
82
|
+
> **Hardware Acceleration & GPU Drivers:**
|
|
83
|
+
> To run large models (like `gemma4` or `ministral-3:14b`) efficiently on local backends (such as Ollama), it is highly recommended to use GPU hardware acceleration.
|
|
84
|
+
> - **NVIDIA GPUs**: Ensure you have official **NVIDIA Drivers** and the **CUDA Toolkit** installed so that Ollama can offload model layers to GPU VRAM.
|
|
85
|
+
> - **AMD & Apple Silicon**: Ollama also supports ROCm (AMD) and Metal (Apple Silicon) natively. Make sure your local setup is utilizing GPU acceleration to avoid slow CPU execution times.
|
|
86
|
+
|
|
87
|
+
### 2. Web IDE / GUI Requirements
|
|
88
|
+
- **Desktop Window Mode (Optional)**: Launches a native app window using `pywebview`.
|
|
89
|
+
- **Windows**: Works out of the box using Windows Webview2 (Edge).
|
|
90
|
+
- **Linux**: Requires **WebKit2GTK** python bindings (specifically `python3-gi` and `gir1.2-webkit2-4.1`) or **Qt5/Qt6** (PyQt/PySide) installed on the system.
|
|
91
|
+
- **Browser Fallback**: If desktop window dependencies are missing, OpalaCoder automatically starts the IDE server and opens it in your default web browser (`http://127.0.0.1:3000`).
|
|
92
|
+
- **Frontend Development (Optional)**: If you intend to compile the React/Vite frontend source code under `gui_src/`, you will need **Node.js 18+** and **npm**. (Compiled assets are already bundled in default packages).
|
|
81
93
|
|
|
82
94
|
---
|
|
83
95
|
|
|
84
96
|
## Installation
|
|
85
97
|
|
|
98
|
+
Try:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
pip install opalacoder
|
|
102
|
+
```
|
|
103
|
+
|
|
86
104
|
```bash
|
|
87
105
|
git clone https://github.com/gilzamir/OpalaCoder
|
|
88
106
|
cd OpalaCoder
|
|
@@ -1819,7 +1819,7 @@ export default function App() {
|
|
|
1819
1819
|
<div style={{ display: 'flex', flexDirection: 'column', gap: '14px', color: '#cccccc' }}>
|
|
1820
1820
|
<div style={{ display: 'flex', flexDirection: 'column', gap: '4px' }}>
|
|
1821
1821
|
<span className="vscode-sidebar-section-title" style={{ padding: 0 }}>Versão</span>
|
|
1822
|
-
<span style={{ fontSize: '13px', fontWeight: 'bold', color: '#ffffff' }}>0.1.
|
|
1822
|
+
<span style={{ fontSize: '13px', fontWeight: 'bold', color: '#ffffff' }}>0.1.6 alfa</span>
|
|
1823
1823
|
</div>
|
|
1824
1824
|
<div style={{ display: 'flex', flexDirection: 'column', gap: '4px' }}>
|
|
1825
1825
|
<span className="vscode-sidebar-section-title" style={{ padding: 0 }}>Autor</span>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"""OpalaCoder – AI coding agent with session management and modular execution."""
|
|
2
|
-
__version__ = "0.1.
|
|
2
|
+
__version__ = "0.1.6"
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2014 The xterm.js authors. All rights reserved.
|
|
3
|
+
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
|
4
|
+
* https://github.com/chjj/term.js
|
|
5
|
+
* @license MIT
|
|
6
|
+
*
|
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
* furnished to do so, subject to the following conditions:
|
|
13
|
+
*
|
|
14
|
+
* The above copyright notice and this permission notice shall be included in
|
|
15
|
+
* all copies or substantial portions of the Software.
|
|
16
|
+
*
|
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
|
+
* THE SOFTWARE.
|
|
24
|
+
*
|
|
25
|
+
* Originally forked from (with the author's permission):
|
|
26
|
+
* Fabrice Bellard's javascript vt100 for jslinux:
|
|
27
|
+
* http://bellard.org/jslinux/
|
|
28
|
+
* Copyright (c) 2011 Fabrice Bellard
|
|
29
|
+
* The original design remains. The terminal itself
|
|
30
|
+
* has been extended to include xterm CSI codes, among
|
|
31
|
+
* other features.
|
|
32
|
+
*/.xterm{cursor:text;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:transparent;pointer-events:none}.xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}.xterm .xterm-accessibility-tree{font-family:monospace;-webkit-user-select:text;user-select:text;white-space:pre}.xterm .xterm-accessibility-tree>div{transform-origin:left;width:fit-content}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{text-decoration:double underline}.xterm-underline-3{text-decoration:wavy underline}.xterm-underline-4{text-decoration:dotted underline}.xterm-underline-5{text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{text-decoration:overline double underline}.xterm-overline.xterm-underline-3{text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}.xterm .xterm-scrollable-element>.scrollbar{cursor:default}.xterm .xterm-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.xterm .xterm-scrollable-element>.visible{opacity:1;background:#0000;transition:opacity .1s linear;z-index:11}.xterm .xterm-scrollable-element>.invisible{opacity:0;pointer-events:none}.xterm .xterm-scrollable-element>.invisible.fade{transition:opacity .8s linear}.xterm .xterm-scrollable-element>.shadow{position:absolute;display:none}.xterm .xterm-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:var(--vscode-scrollbar-shadow, #000) 0 6px 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.xterm .xterm-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}:root{--vscode-bg: #1e1e1e;--vscode-sidebar-bg: #252526;--vscode-activitybar-bg: #333333;--vscode-editor-bg: #1e1e1e;--vscode-panel-bg: #1e1e1e;--vscode-statusbar-bg: #007acc;--vscode-statusbar-fg: #ffffff;--vscode-text-fg: #cccccc;--vscode-text-light: #ffffff;--vscode-border: #3c3c3c;--vscode-active-item: #37373d;--vscode-hover-item: #2a2d2e;--vscode-active-border: #007acc;--vscode-input-bg: #2d2d2d;--vscode-button-bg: #0e639c;--vscode-button-hover: #1177bb;--vscode-tab-active-bg: #1e1e1e;--vscode-tab-inactive-bg: #2d2d2d;--vscode-terminal-bg: #1e1e1e}.light-theme{--vscode-bg: #f3f3f3;--vscode-sidebar-bg: #e1e1e1;--vscode-activitybar-bg: #2c2c2c;--vscode-editor-bg: #ffffff;--vscode-panel-bg: #f3f3f3;--vscode-statusbar-bg: #007acc;--vscode-statusbar-fg: #ffffff;--vscode-text-fg: #333333;--vscode-text-light: #000000;--vscode-border: #cccccc;--vscode-active-item: #d0d0d0;--vscode-hover-item: #e4e4e4;--vscode-active-border: #007acc;--vscode-input-bg: #ffffff;--vscode-button-bg: #007acc;--vscode-button-hover: #005a9e;--vscode-tab-active-bg: #f3f3f3;--vscode-tab-inactive-bg: #e1e1e1;--vscode-terminal-bg: #ffffff}*{box-sizing:border-box;margin:0;padding:0}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;background-color:var(--vscode-bg);color:var(--vscode-text-fg);overflow:hidden;height:100vh;font-size:13px}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:#79797966}::-webkit-scrollbar-thumb:hover{background:#646464b3}code,pre{font-family:Fira Code,Courier New,Courier,monospace}input,select,textarea{background-color:var(--vscode-input-bg);border:1px solid var(--vscode-border);color:var(--vscode-text-fg);font-family:inherit;font-size:13px;padding:6px 8px;outline:none}input:focus,select:focus,textarea:focus{border-color:var(--vscode-active-border)}.vscode-button{background-color:var(--vscode-button-bg);color:#fff;border:none;padding:6px 12px;font-size:12px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:6px}.vscode-button:hover:not(:disabled){background-color:var(--vscode-button-hover)}.vscode-button:disabled{opacity:.5;cursor:not-allowed}.vscode-app{display:flex;flex-direction:column;height:100vh;overflow:hidden}.vscode-main{display:flex;flex:1;overflow:hidden}.vscode-activitybar{width:48px;background-color:var(--vscode-activitybar-bg);border-right:1px solid var(--vscode-border);display:flex;flex-direction:column;justify-content:space-between;align-items:center;padding:12px 0;flex-shrink:0}.vscode-activitybar-top{display:flex;flex-direction:column;gap:16px;align-items:center;width:100%}.vscode-activitybar-btn{background:transparent;border:none;color:#858585;padding:8px;cursor:pointer;width:100%;display:flex;justify-content:center;align-items:center;border-left:2px solid transparent;outline:none}.vscode-activitybar-btn.active{color:#fff;border-left-color:var(--vscode-active-border)}.vscode-activitybar-btn:hover{color:#fff}.vscode-sidebar{width:260px;background-color:var(--vscode-sidebar-bg);border-right:1px solid var(--vscode-border);display:flex;flex-direction:column;flex-shrink:0;overflow:hidden}.vscode-sidebar-header{padding:8px 12px;border-bottom:1px solid var(--vscode-border);display:flex;align-items:center;justify-content:space-between}.vscode-sidebar-title{font-size:11px;font-weight:700;text-transform:uppercase;color:#969696;letter-spacing:.5px}.vscode-sidebar-section{border-bottom:1px solid var(--vscode-border);padding:8px}.vscode-sidebar-section-title{font-size:10px;font-weight:700;color:gray;text-transform:uppercase;padding:2px 4px;margin-bottom:4px}.vscode-sidebar-content{flex:1;overflow-y:auto;padding:4px}.vscode-project-item{display:flex;align-items:center;justify-content:space-between;padding:6px 10px;cursor:pointer;color:#b0b0b0;border-radius:2px}.vscode-project-item:hover{background-color:var(--vscode-hover-item);color:#fff}.vscode-project-item.active{background-color:var(--vscode-active-item);color:#fff}.vscode-tree-node{display:flex;align-items:center;gap:6px;padding:4px 8px;cursor:pointer;color:#ccc;font-size:13px}.vscode-tree-node:hover{background-color:var(--vscode-hover-item)}.vscode-tree-node.active{background-color:var(--vscode-active-item);color:#fff;border-left:2px solid var(--vscode-active-border)}.vscode-editor-panel{flex:1;display:flex;flex-direction:column;background-color:var(--vscode-bg);overflow:hidden}.vscode-tabs{height:35px;background-color:var(--vscode-tab-inactive-bg);border-bottom:1px solid #252526;display:flex;align-items:center;justify-content:space-between;padding-right:16px;flex-shrink:0}.vscode-tab{height:100%;background-color:var(--vscode-tab-active-bg);border-top:2px solid var(--vscode-active-border);padding:0 16px;display:flex;align-items:center;gap:8px;border-right:1px solid #252526}.vscode-tab-close-btn{background:transparent;border:none;color:#858585;cursor:pointer;display:flex;align-items:center;padding:2px}.vscode-tab-close-btn:hover{background-color:#3c3c3c;color:#fff;border-radius:50%}.vscode-editor-container{flex:1;position:relative;background-color:var(--vscode-bg)}.vscode-bottom-panel{border-top:1px solid var(--vscode-border);background-color:var(--vscode-bg);display:flex;flex-direction:column;flex-shrink:0}.vscode-bottom-tabs{height:30px;background-color:var(--vscode-sidebar-bg);border-bottom:1px solid var(--vscode-border);display:flex;align-items:center;justify-content:space-between;padding:0 16px}.vscode-bottom-tab-list{display:flex;gap:16px;height:100%}.vscode-bottom-tab{font-size:11px;font-weight:700;text-transform:uppercase;color:gray;display:flex;align-items:center;cursor:pointer;height:100%}.vscode-bottom-tab.active{color:#fff;border-bottom:2px solid var(--vscode-active-border)}.vscode-logs{flex:1;padding:12px;overflow-y:auto;font-family:Fira Code,monospace;font-size:12px;line-height:1.5;background-color:var(--vscode-terminal-bg)}.vscode-chat{width:320px;background-color:var(--vscode-sidebar-bg);border-left:1px solid var(--vscode-border);display:flex;flex-direction:column;flex-shrink:0;overflow:hidden}.vscode-chat-header{padding:8px 12px;border-bottom:1px solid var(--vscode-border);display:flex;align-items:center;justify-content:space-between}.vscode-chat-toolbar{display:flex;border-bottom:1px solid var(--vscode-border);background-color:var(--vscode-bg)}.vscode-chat-tool-btn{flex:1;background:transparent;border:none;border-right:1px solid var(--vscode-border);color:#a0a0a0;font-size:10px;font-weight:700;padding:6px 0;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:4px}.vscode-chat-tool-btn:hover{background-color:var(--vscode-hover-item);color:#fff}.vscode-chat-history{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:16px;background-color:var(--vscode-sidebar-bg)}.vscode-chat-msg-header{font-size:10px;font-weight:700;text-transform:uppercase;margin-bottom:4px}.vscode-chat-msg-content{font-size:13px;line-height:1.6;color:#ccc;padding-left:8px;border-left:1px solid var(--vscode-border);white-space:pre-wrap}.vscode-chat-form{padding:12px;border-top:1px solid var(--vscode-border);background-color:var(--vscode-bg)}.vscode-chat-input-row{display:flex;gap:6px;align-items:center}.vscode-statusbar{height:22px;background-color:var(--vscode-statusbar-bg);color:var(--vscode-statusbar-fg);font-size:11px;display:flex;justify-content:space-between;align-items:center;padding:0 12px;flex-shrink:0}.vscode-modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:#0009;display:flex;align-items:center;justify-content:center;z-index:100}.vscode-modal{background-color:var(--vscode-sidebar-bg);border:1px solid var(--vscode-border);width:100%;max-w:400px;box-shadow:0 4px 20px #00000080;display:flex;flex-direction:column}.flex{display:flex}.flex-1{flex:1}.flex-col{flex-direction:column}.flex-shrink-0{flex-shrink:0}.items-center{align-items:center}.justify-between{justify-content:space-between}.relative{position:relative}.h-full{height:100%}.w-full{width:100%}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.text-white{color:#fff}.truncate{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.vscode-resizer-horizontal{width:4px;background-color:#252526;cursor:col-resize;flex-shrink:0;transition:background-color .2s ease;z-index:10;border-left:1px solid var(--vscode-border);border-right:1px solid var(--vscode-border)}.vscode-resizer-horizontal:hover,.vscode-resizer-horizontal:active{background-color:var(--vscode-active-border);border-left-color:var(--vscode-active-border);border-right-color:var(--vscode-active-border)}.vscode-resizer-vertical{height:4px;background-color:#252526;cursor:row-resize;flex-shrink:0;transition:background-color .2s ease;z-index:10;border-top:1px solid var(--vscode-border);border-bottom:1px solid var(--vscode-border)}.vscode-resizer-vertical:hover,.vscode-resizer-vertical:active{background-color:var(--vscode-active-border);border-top-color:var(--vscode-active-border);border-bottom-color:var(--vscode-active-border)}.vscode-context-menu{position:fixed;background-color:var(--vscode-sidebar-bg);border:1px solid var(--vscode-border);box-shadow:0 4px 12px #00000080;border-radius:4px;padding:4px 0;z-index:1000;min-width:150px}.vscode-context-menu-item{display:flex;align-items:center;gap:8px;padding:6px 12px;font-size:12px;color:#ccc;cursor:pointer;-webkit-user-select:none;user-select:none}.vscode-context-menu-item:hover{background-color:#007acc;color:#fff}.thinking-indicator{display:inline-flex;align-items:center;gap:4px;padding:4px 0}.thinking-indicator .dot{width:6px;height:6px;background-color:orchid;border-radius:50%;display:inline-block;animation:pulse 1.4s infinite ease-in-out both}.thinking-indicator .dot:nth-child(1){animation-delay:-.32s}.thinking-indicator .dot:nth-child(2){animation-delay:-.16s}@keyframes pulse{0%,80%,to{transform:scale(0);opacity:.3}40%{transform:scale(1);opacity:1}}
|
|
@@ -202,5 +202,5 @@ WARNING: This link could potentially be dangerous`)){let i=window.open();if(i){t
|
|
|
202
202
|
*/var lC=2,aC=1,hC=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){var u;if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:((u=this._terminal.options.overviewRuler)==null?void 0:u.width)||14,i=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(i.getPropertyValue("height")),s=Math.max(0,parseInt(i.getPropertyValue("width"))),n=window.getComputedStyle(this._terminal.element),o={top:parseInt(n.getPropertyValue("padding-top")),bottom:parseInt(n.getPropertyValue("padding-bottom")),right:parseInt(n.getPropertyValue("padding-right")),left:parseInt(n.getPropertyValue("padding-left"))},l=o.top+o.bottom,h=o.right+o.left,a=r-l,d=s-h-t;return{cols:Math.max(lC,Math.floor(d/e.css.cell.width)),rows:Math.max(aC,Math.floor(a/e.css.cell.height))}}};const Gn=(e,t)=>{try{const i=localStorage.getItem(e);return i!==null?i:t}catch{return t}},Qn=(e,t)=>{try{localStorage.setItem(e,t)}catch{}};function cC(){const[e,t]=D.useState([]),[i,r]=D.useState(null),[s,n]=D.useState([]),[o,l]=D.useState(null),[h,a]=D.useState(""),[d,u]=D.useState(!1),[f,g]=D.useState([]),[m,S]=D.useState(""),[E,_]=D.useState(!1),[p,v]=D.useState([]),[w,x]=D.useState(!1),[P,L]=D.useState(!0),[O,q]=D.useState("explorer"),[A,G]=D.useState("output"),[z,M]=D.useState([]),[I,b]=D.useState(!1),[T,K]=D.useState("preferences"),[C,j]=D.useState(()=>Gn("theme","dark")),[U,H]=D.useState(()=>Number(Gn("editorFontSize",13))),[V,te]=D.useState(()=>Number(Gn("editorTabSize",4))),[re,pe]=D.useState(()=>Gn("editorWordWrap","on")),[le,Ze]=D.useState([]),[oi,At]=D.useState(""),[wi,Ci]=D.useState(!1),lt=D.useRef(null),ee=D.useRef(null),xi=D.useRef(null),gn=D.useRef(null),[Hc,jm]=D.useState(260),[Uc,$m]=D.useState(320),[_l,Fm]=D.useState(240),[ml,Kc]=D.useState(null),[vn,Vc]=D.useState(null),[Ve,qt]=D.useState(null),gl=(y,R)=>{y.preventDefault();const $=y.clientX,ne=y.clientY,pt=Hc,zt=Uc,qe=_l,kt=Yt=>{if(R==="left"){const _t=Yt.clientX-$,is=Math.max(150,Math.min(600,pt+_t));jm(is)}else if(R==="right"){const _t=$-Yt.clientX,is=Math.max(200,Math.min(800,zt+_t));$m(is)}else if(R==="bottom"){const _t=ne-Yt.clientY,is=Math.max(80,Math.min(600,qe+_t));Fm(is)}},It=()=>{document.removeEventListener("mousemove",kt),document.removeEventListener("mouseup",It)};document.addEventListener("mousemove",kt),document.addEventListener("mouseup",It)},[Wm,yn]=D.useState(!1),[Sn,qc]=D.useState(""),[vl,Yc]=D.useState(""),[Xc,Gc]=D.useState(""),[Qc,Hm]=D.useState("gemini/gemini-2.5-flash"),[Jc,Um]=D.useState("auto"),[Zc,eu]=D.useState(""),[tu,iu]=D.useState(""),ru=D.useRef(null),su=D.useRef(null);D.useEffect(()=>{wn()},[]),D.useEffect(()=>{i?(xn(),g([{role:"assistant",content:`Olá! Estou pronto para auxiliar no projeto **${i.project_name||i.name}**.`}])):(n([]),l(null),a(""))},[i]),D.useEffect(()=>{const y=$=>{$.preventDefault()};document.addEventListener("contextmenu",y);const R=()=>{Kc(null)};return document.addEventListener("click",R),()=>{document.removeEventListener("contextmenu",y),document.removeEventListener("click",R)}},[]),D.useEffect(()=>{var y;(y=ru.current)==null||y.scrollIntoView({behavior:"smooth"})},[f]),D.useEffect(()=>{var y;(y=su.current)==null||y.scrollIntoView({behavior:"smooth"})},[p]),D.useEffect(()=>{const y=R=>{(R.ctrlKey||R.metaKey)&&R.key==="s"&&(R.preventDefault(),ou())};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[o,h,i]),D.useEffect(()=>{if(!i){xi.current&&(xi.current.close(),xi.current=null);return}if(!lt.current)return;const y=new oC({cursorBlink:!0,fontSize:13,fontFamily:'Consolas, "Courier New", monospace',theme:{background:"#1e1e1e",foreground:"#cccccc"}}),R=new hC;y.loadAddon(R),lt.current.innerHTML="",y.open(lt.current);try{R.fit()}catch{}ee.current=y,gn.current=R;const $=i.project_path,ne=`/api/terminal/stream?projectPath=${encodeURIComponent($)}`,pt=new EventSource(ne);xi.current=pt,pt.onmessage=qe=>{try{const kt=qe.data,It=atob(kt),Yt=new Uint8Array(It.length);for(let _t=0;_t<It.length;_t++)Yt[_t]=It.charCodeAt(_t);y.write(Yt)}catch(kt){console.error("Error decoding terminal stream data",kt)}},pt.onerror=qe=>{console.error("Terminal event source error",qe),y.write(`\r
|
|
203
203
|
\x1B[31m[OpalaCoder] Conexão com o terminal perdida. Reconectando...\x1B[0m\r
|
|
204
204
|
`)},y.onData(qe=>{fetch("/api/terminal/input",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"input",text:qe,projectPath:i.project_path})}).catch(kt=>console.error("Failed to send terminal input",kt))});const zt=new ResizeObserver(()=>{if(R)try{R.fit();const{cols:qe,rows:kt}=y;fetch("/api/terminal/input",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"resize",cols:qe,rows:kt,projectPath:i.project_path})}).catch(It=>console.error("Failed to send terminal resize",It))}catch{}});return zt.observe(lt.current),()=>{zt.disconnect(),pt&&pt.close(),y.dispose(),ee.current=null,gn.current=null}},[i]),D.useEffect(()=>{Qn("theme",C),C==="light"?document.body.classList.add("light-theme"):document.body.classList.remove("light-theme")},[C]),D.useEffect(()=>{A==="terminal"&&ee.current&&gn.current&&i&&setTimeout(()=>{try{gn.current.fit();const{cols:y,rows:R}=ee.current;fetch("/api/terminal/input",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"resize",cols:y,rows:R,projectPath:i.project_path})}).catch($=>console.error("Failed to send terminal resize",$)),ee.current.focus()}catch{}},50)},[A,_l,i]),D.useEffect(()=>{i?Cn():Ze([])},[i]),D.useEffect(()=>{O==="git"&&i&&Cn()},[O,i]);const wn=async()=>{try{const y=await fetch("/api/opalacoder/list-projects");if(y.ok){const R=await y.json();t(R.projects||[]),R.projects&&R.projects.length>0&&!i&&nu(R.projects[0])}}catch(y){X("error",`Falha ao carregar projetos: ${y.message}`)}},Cn=async()=>{if(i)try{const y=await fetch(`/api/git/status?projectPath=${encodeURIComponent(i.project_path)}`);if(y.ok){const R=await y.json();Ze(R.files||[])}}catch(y){console.error("Failed to fetch git status",y)}},Km=async y=>{if(y&&y.preventDefault(),!(!i||!oi.trim()||wi)){Ci(!0),X("info",`Criando commit com a mensagem: "${oi}"...`);try{const R=await fetch("/api/git/commit",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectPath:i.project_path,message:oi})});if(R.ok)X("info","Commit criado com sucesso!"),At(""),Cn();else{const $=await R.json();X("error",`Falha ao fazer commit: ${$.error||"Erro desconhecido"}`)}}catch(R){X("error",`Erro ao fazer commit: ${R.message}`)}finally{Ci(!1)}}},nu=y=>{r(y),X("info",`Projeto selecionado: ${y.project_name||y.name}`)},xn=async()=>{if(i)try{const y=await fetch(`/api/files?projectPath=${encodeURIComponent(i.project_path)}`);if(y.ok){const R=await y.json();n(R.files||[])}else{const R=await y.json();X("error",`Falha ao listar arquivos: ${R.error}`)}}catch(y){X("error",`Erro na chamada de arquivos: ${y.message}`)}},Vm=y=>{i&&(y.preventDefault(),y.stopPropagation(),Kc({x:y.clientX,y:y.clientY}))},qm=async()=>{if(!i)return;const y=window.prompt("Nome do novo arquivo (ex: src/utils.py):");if(y)try{const R=await fetch("/api/file/write",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectPath:i.project_path,filePath:y,content:""})});if(R.ok)X("info",`Arquivo criado: ${y}`),await xn(),l(y),a("");else{const $=await R.json();X("error",`Falha ao criar arquivo: ${$.error}`),alert(`Erro ao criar arquivo: ${$.error}`)}}catch(R){X("error",`Erro na chamada de criação de arquivo: ${R.message}`)}},Ym=async()=>{if(!(!i||!o)&&window.confirm(`Tem certeza que deseja deletar o arquivo "${o}"?`))try{const y=await fetch("/api/file/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectPath:i.project_path,filePath:o})});if(y.ok)X("info",`Arquivo excluído: ${o}`),l(null),a(""),await xn();else{const R=await y.json();X("error",`Falha ao deletar arquivo: ${R.error}`),alert(`Erro ao deletar arquivo: ${R.error}`)}}catch(y){X("error",`Erro na chamada de exclusão de arquivo: ${y.message}`)}},Xm=async y=>{if(i){l(y);try{const R=await fetch(`/api/file/read?projectPath=${encodeURIComponent(i.project_path)}&filePath=${encodeURIComponent(y)}`);if(R.ok){const $=await R.json();a($.content)}else X("error",`Erro ao ler arquivo: ${y}`)}catch(R){X("error",`Erro de leitura: ${R.message}`)}}},ou=async()=>{if(!(!i||!o)){u(!0);try{(await fetch("/api/file/write",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectPath:i.project_path,filePath:o,content:h})})).ok?(X("info",`Arquivo salvo: ${o}`),Cn()):X("error",`Erro ao salvar arquivo: ${o}`)}catch(y){X("error",`Erro de escrita: ${y.message}`)}finally{u(!1)}}},Gm=async y=>{if(y.preventDefault(),!(!Sn||!vl))try{const R=await fetch("/api/opalacoder/create-project",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({project_name:Sn,project_path:vl,description:Xc,model:Qc,mode:Jc,api_key:Zc,api_base:tu})});if(R.ok)X("info",`Projeto '${Sn}' registrado.`),yn(!1),qc(""),Yc(""),Gc(""),eu(""),iu(""),wn();else{const $=await R.json();X("error",`Erro ao criar projeto: ${$.error}`)}}catch(R){X("error",`Erro ao criar: ${R.message}`)}},Qm=async y=>{if(confirm(`Remover projeto '${y}'?`))try{(await fetch("/api/opalacoder/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({project_name:y})})).ok&&(X("info",`Projeto removido: ${y}`),i&&i.name===y&&r(null),wn())}catch(R){X("error",`Erro ao excluir: ${R.message}`)}},Jm=(y,R)=>{y.stopPropagation(),qt({name:R.name,project_name:R.project_name||R.name,project_path:R.project_path||"",model:R.model||"",alternative_model:R.alternative_model||"",mode:R.mode||"auto",description:R.description||""})},Zm=async y=>{if(y.preventDefault(),!!Ve)try{const R=await fetch("/api/opalacoder/update-project",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({project_name:Ve.name,display_name:Ve.project_name,project_path:Ve.project_path,model:Ve.model,alternative_model:Ve.alternative_model,mode:Ve.mode,description:Ve.description})});if(R.ok){const $=await R.json();X("info",`Projeto '${$.project_name}' atualizado.`),qt(null),await wn(),i&&i.name===$.name&&r(ne=>({...ne,...$}))}else{const $=await R.json();X("error",`Erro ao atualizar: ${$.error}`)}}catch(R){X("error",`Erro ao atualizar projeto: ${R.message}`)}},X=(y,R)=>{v($=>[...$,{type:y,message:R,timestamp:new Date().toLocaleTimeString()}])},yl=y=>{G(y),w&&x(!1)},eg=async y=>{if(y&&y.preventDefault(),!m.trim()||!i||E)return;const R=m;S(""),g($=>[...$,{role:"user",content:R}]),_(!0),M([]),X("info",`Iniciando agente para prompt: "${R}"`);try{const $=await fetch("/api/opalacoder/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:"run",agent:"chat_orchestrator",prompt:R,project_name:i.name,project_path:i.project_path,model:i.model})});if(!$.body){X("error","ReadableStream não suportado pelo backend."),_(!1);return}const ne=$.body.getReader(),pt=new TextDecoder;let zt="";for(;;){const{done:qe,value:kt}=await ne.read();if(qe)break;zt+=pt.decode(kt,{stream:!0});const It=zt.split(`
|
|
205
|
-
`);zt=It.pop();for(const Yt of It)if(Yt.trim())try{const _t=JSON.parse(Yt);lu(_t)}catch{X("stdout",Yt)}}if(zt.trim())try{const qe=JSON.parse(zt);lu(qe)}catch{X("stdout",zt)}}catch($){X("error",`Falha na execução: ${$.message}`)}finally{_(!1),xn()}},lu=y=>{const{event:R,...$}=y;switch(R){case"server_ready":X("info","Agente pronto.");break;case"agent_started":X("info",`Agente ${$.agent} iniciado.`);break;case"thought":X("thought",$.content);break;case"tool_call":X("tool_call",`Chamando: ${$.tool} (${JSON.stringify($.arguments)})`);break;case"tool_result":X("tool_result",`Sucesso: ${$.tool}`);break;case"agent_response":X("info","Resposta recebida."),g(ne=>{const pt=ne[ne.length-1];return pt&&pt.role==="assistant"&&pt.content===$.response?(X("info","Duplicate assistant message ignored."),ne):[...ne,{role:"assistant",content:$.response}]});break;case"agent_finished":X("info","Processamento concluído.");break;case"input_request":Vc({id:$.id,prompt:$.prompt,options:$.options||["yes","no"],default:$.default||"yes"}),X("info",`🔔 Aguardando confirmação: ${$.prompt}`);break;case"error":X("error",$.message);break;case"problem":X("error",`[Problema em ${$.tool}]: ${$.message}`),M(ne=>[...ne,{id:Math.random().toString(),tool:$.tool,message:$.message,severity:$.severity||"error",timestamp:new Date().toLocaleTimeString()}]);break;default:X("info",`Evento: ${R}`)}},au=async y=>{if(!vn)return;const{id:R,prompt:$}=vn;Vc(null),X("info",`✅ Confirmação: "${$}" → ${y}`);try{await fetch("/api/opalacoder/input_response",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:R,value:y})})}catch(ne){X("error",`Erro ao enviar confirmação: ${ne.message}`)}},tg=y=>{if(!y)return"plaintext";const R=y.split(".").pop().toLowerCase();return{py:"python",js:"javascript",jsx:"javascript",ts:"typescript",tsx:"typescript",html:"html",css:"css",json:"json",md:"markdown",yml:"yaml",yaml:"yaml",sh:"shell"}[R]||"plaintext"};return c.jsxs("div",{className:"vscode-app",children:[c.jsxs("div",{className:"vscode-main",children:[c.jsxs("div",{className:"vscode-activitybar",children:[c.jsxs("div",{className:"vscode-activitybar-top",children:[c.jsx("button",{onClick:()=>q("explorer"),className:`vscode-activitybar-btn ${O==="explorer"?"active":""}`,title:"Explorer",children:c.jsx(bd,{size:22})}),c.jsxs("button",{onClick:()=>q("git"),className:`vscode-activitybar-btn ${O==="git"?"active":""}`,title:"Source Control",style:{position:"relative"},children:[c.jsx(qy,{size:22}),le.length>0&&c.jsx("span",{style:{position:"absolute",top:"4px",right:"4px",background:"#007acc",color:"#ffffff",borderRadius:"50%",width:"16px",height:"16px",fontSize:"9px",fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 0 4px rgba(0,0,0,0.5)"},children:le.length})]}),c.jsx("button",{onClick:()=>L(!P),className:`vscode-activitybar-btn ${P?"active":""}`,title:"Copilot Chat",children:c.jsx(kd,{size:22})})]}),c.jsx("div",{children:c.jsx("button",{onClick:()=>b(!0),className:"vscode-activitybar-btn",title:"Settings",children:c.jsx(Hn,{size:20})})})]}),c.jsx("aside",{className:"vscode-sidebar",style:{width:`${Hc}px`},children:O==="explorer"?c.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[c.jsxs("div",{className:"vscode-sidebar-header",children:[c.jsx("span",{className:"vscode-sidebar-title",children:"EXPLORER: PROJECTS"}),c.jsx("button",{onClick:()=>yn(!0),style:{background:"transparent",border:"none",cursor:"pointer",color:"#c5c5c5"},title:"Novo Projeto...",children:c.jsx(Ed,{size:14})})]}),c.jsxs("div",{className:"vscode-sidebar-section",children:[c.jsx("div",{className:"vscode-sidebar-section-title",children:"Selecione o Projeto"}),c.jsx("div",{className:"overflow-y-auto",style:{maxHeight:"140px"},children:e.map(y=>{const R=i&&i.name===y.name;return c.jsxs("div",{onClick:()=>nu(y),className:`vscode-project-item ${R?"active":""}`,children:[c.jsxs("div",{className:"truncate flex-1",children:[c.jsx("div",{style:{fontSize:"13px",fontWeight:"500"},className:"truncate",children:y.project_name||y.name}),c.jsx("div",{style:{fontSize:"10px",color:"#808080"},className:"truncate",children:y.project_path})]}),c.jsx("button",{onClick:$=>Jm($,y),style:{background:"transparent",border:"none",cursor:"pointer",color:"#a0a0a0",padding:"2px 4px"},title:"Configurar projeto",children:c.jsx(Hn,{size:12})}),c.jsx("button",{onClick:$=>{$.stopPropagation(),Qm(y.name)},style:{background:"transparent",border:"none",cursor:"pointer",color:"#a0a0a0",padding:"2px 4px"},title:"Remover projeto",children:c.jsx(Md,{size:12})})]},y.name)})})]}),c.jsxs("div",{className:"vscode-sidebar-content",onContextMenu:Vm,children:[c.jsx("div",{className:"vscode-sidebar-section-title",children:"Workspace Files"}),s.length===0?c.jsx("div",{style:{fontSize:"12px",color:"#808080",padding:"0 4px",fontStyle:"italic"},children:"Selecione um projeto para explorar."}):c.jsx("div",{children:s.map(y=>c.jsx(Im,{node:y,selectedFile:o,handleFileSelect:Xm},y.path))})]})]}):c.jsxs("div",{className:"vscode-sidebar-content",style:{padding:"12px",display:"flex",flexDirection:"column",height:"100%",gap:"16px"},children:[c.jsx("div",{className:"vscode-sidebar-title",children:"SOURCE CONTROL (GIT)"}),i?le.length===0?c.jsx("div",{style:{fontSize:"12px",color:"#808080",fontStyle:"italic"},children:"Sem alterações locais."}):c.jsxs("div",{className:"flex flex-col flex-1 overflow-hidden",style:{gap:"16px"},children:[c.jsxs("form",{onSubmit:Km,className:"flex flex-col",style:{gap:"8px"},children:[c.jsx("input",{type:"text",placeholder:"Mensagem do Commit...",value:oi,onChange:y=>At(y.target.value),required:!0,style:{width:"100%",fontSize:"12px"}}),c.jsx("button",{type:"submit",className:"vscode-button",disabled:wi||!oi.trim(),style:{width:"100%"},children:wi?"Commit...":"Commit"})]}),c.jsxs("div",{className:"flex-1 overflow-y-auto",style:{borderTop:"1px solid var(--vscode-border)",paddingTop:"12px"},children:[c.jsxs("div",{className:"vscode-sidebar-section-title",style:{marginBottom:"8px",padding:0},children:["Modificações (",le.length,")"]}),c.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:le.map((y,R)=>{let $="#cccccc",ne=y.status;return y.status==="M"?($="#e2b52b",ne="M"):y.status==="??"||y.status==="A"?($="#73c991",ne="U"):y.status==="D"&&($="#f48771",ne="D"),c.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"12px",padding:"4px 6px",borderRadius:"3px",background:"rgba(255,255,255,0.02)"},children:[c.jsx("span",{className:"truncate",title:y.path,style:{color:"#cccccc",flex:1,marginRight:"8px"},children:y.path}),c.jsx("span",{style:{fontWeight:"bold",color:$,fontSize:"11px",minWidth:"12px",textAlign:"center"},children:ne})]},R)})})]})]}):c.jsx("div",{style:{fontSize:"12px",color:"#808080",fontStyle:"italic"},children:"Selecione um projeto para ver as alterações Git."})]})}),c.jsx("div",{className:"vscode-resizer-horizontal",onMouseDown:y=>gl(y,"left")}),c.jsxs("main",{className:"vscode-editor-panel",children:[o?c.jsxs("div",{className:"vscode-editor-panel",children:[c.jsxs("div",{className:"vscode-tabs",children:[c.jsx("div",{className:"flex h-full",children:c.jsxs("div",{className:"vscode-tab",children:[c.jsx("span",{style:{color:"#ffffff"},children:o.split("/").pop()}),c.jsx("button",{onClick:()=>l(null),className:"vscode-tab-close-btn",children:c.jsx(us,{size:12})})]})}),c.jsx("div",{children:c.jsxs("button",{onClick:ou,disabled:d,className:"vscode-button",children:[d?c.jsx(Pd,{size:12,className:"animate-spin"}):c.jsx(Xl,{size:12}),c.jsx("span",{children:d?"Salvando...":"Salvar (Ctrl+S)"})]})})]}),c.jsx("div",{className:"vscode-editor-container",children:c.jsx(zy,{height:"100%",language:tg(o),theme:C==="light"?"light":"vs-dark",value:h,onChange:y=>a(y),options:{minimap:{enabled:!0},fontSize:U,lineNumbers:"on",tabSize:V,wordWrap:re,automaticLayout:!0}})})]}):c.jsx("div",{className:"vscode-editor-container",style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:c.jsxs("div",{style:{textAlign:"center"},children:[c.jsx(bd,{size:64,style:{color:"#3c3c3c",marginBottom:"16px"}}),c.jsx("h3",{style:{fontSize:"14px",fontWeight:"bold",color:"#b0b0b0",marginBottom:"4px"},children:"Nenhum Arquivo Aberto"}),c.jsx("p",{style:{fontSize:"12px",color:"#808080"},children:"Abra um arquivo na barra lateral esquerda."})]})}),!w&&c.jsx("div",{className:"vscode-resizer-vertical",onMouseDown:y=>gl(y,"bottom")}),c.jsxs("div",{className:"vscode-bottom-panel",style:{height:w?"30px":`${_l}px`},children:[c.jsxs("div",{className:"vscode-bottom-tabs",children:[c.jsxs("div",{className:"vscode-bottom-tab-list",children:[c.jsx("span",{className:`vscode-bottom-tab ${A==="output"?"active":""}`,onClick:()=>yl("output"),children:"OUTPUT (OPALACODER)"}),c.jsxs("span",{className:`vscode-bottom-tab ${A==="problems"?"active":""}`,onClick:()=>yl("problems"),children:["PROBLEMS ",z.length>0&&c.jsx("span",{style:{marginLeft:"4px",background:"#f48771",color:"#1e1e1e",borderRadius:"10px",padding:"0 6px",fontSize:"10px",fontWeight:"bold"},children:z.length})]}),c.jsx("span",{className:`vscode-bottom-tab ${A==="terminal"?"active":""}`,onClick:()=>yl("terminal"),children:"TERMINAL"})]}),c.jsx("button",{onClick:()=>x(!w),style:{background:"transparent",border:"none",cursor:"pointer",color:"#a0a0a0"},children:w?c.jsx(Xy,{size:12}):c.jsx(Gy,{size:12})})]}),!w&&c.jsxs("div",{style:{height:"calc(100% - 30px)",width:"100%"},children:[A==="output"&&c.jsxs("div",{className:"vscode-logs",style:{height:"100%"},children:[p.length===0?c.jsx("div",{style:{color:"#808080",fontStyle:"italic"},children:"Nenhum log gerado. Envie uma instrução no chat para iniciar..."}):p.map((y,R)=>{let $="text-[#cccccc]",ne="SYSTEM";return y.type==="error"?($="text-[#f48771] font-semibold",ne="ERROR"):y.type==="info"?($="text-[#75beff]",ne="INFO"):y.type==="thought"?($="text-[#da70d6] italic",ne="THOUGHT"):y.type==="tool_call"?($="text-[#d7ba7d]",ne="TOOL"):y.type==="tool_result"&&($="text-[#89d4a5]",ne="RESULT"),c.jsxs("div",{className:$,style:{display:"flex",alignItems:"flex-start",gap:"6px",marginBottom:"3px"},children:[c.jsxs("span",{style:{color:"#5a5a5a"},children:["[",y.timestamp,"]"]}),c.jsxs("span",{style:{fontWeight:"bold"},children:["[",ne,"]"]}),c.jsx("span",{style:{whiteSpace:"pre-wrap",flex:1},children:y.message})]},R)}),c.jsx("div",{ref:su})]}),A==="problems"&&c.jsx("div",{className:"vscode-problems-list",style:{padding:"8px",overflowY:"auto",height:"100%",color:"#cccccc",fontFamily:"Consolas, monospace",fontSize:"12px"},children:z.length===0?c.jsx("div",{style:{color:"#808080",fontStyle:"italic",padding:"8px"},children:"Nenhum problema detectado."}):z.map(y=>c.jsxs("div",{style:{display:"flex",gap:"8px",alignItems:"flex-start",borderBottom:"1px solid #2d2d2d",padding:"6px 0"},children:[c.jsx(Uy,{size:14,className:"text-[#f48771]",style:{flexShrink:0,marginTop:"2px"}}),c.jsxs("div",{children:[c.jsxs("div",{style:{fontWeight:"bold",color:"#f48771",marginBottom:"2px"},children:["[",y.timestamp,"] Erro em ",y.tool,":"]}),c.jsx("pre",{style:{whiteSpace:"pre-wrap",margin:0,color:"#e0e0e0",fontSize:"12px",fontFamily:"inherit"},children:y.message})]})]},y.id))}),c.jsx("div",{style:{display:A==="terminal"?"block":"none",height:"100%",background:"#1e1e1e",overflow:"hidden"},children:i?c.jsx("div",{ref:lt,style:{width:"100%",height:"100%",padding:"4px"}}):c.jsx("div",{style:{color:"#808080",fontStyle:"italic",padding:"16px"},children:"Defina um projeto/workspace para habilitar o terminal."})})]})]})]}),P&&c.jsx("div",{className:"vscode-resizer-horizontal",onMouseDown:y=>gl(y,"right")}),P&&c.jsxs("aside",{className:"vscode-chat",style:{width:`${Uc}px`},children:[c.jsxs("div",{className:"vscode-chat-header",children:[c.jsxs("span",{className:"vscode-sidebar-title",style:{display:"flex",alignItems:"center",gap:"6px"},children:[c.jsx(kd,{size:12,style:{color:"#007acc"}}),c.jsx("span",{children:"COPILOT CHAT"})]}),c.jsx("button",{onClick:()=>L(!1),style:{background:"transparent",border:"none",cursor:"pointer",color:"#a0a0a0"},children:c.jsx(us,{size:14})})]}),c.jsxs("div",{className:"vscode-chat-toolbar",children:[c.jsxs("button",{onClick:()=>S("/undo"),className:"vscode-chat-tool-btn",children:[c.jsx(Qy,{size:11}),c.jsx("span",{children:"/undo"})]}),c.jsxs("button",{onClick:()=>S("/clear"),className:"vscode-chat-tool-btn",children:[c.jsx(Pd,{size:11}),c.jsx("span",{children:"/clear"})]}),c.jsxs("button",{onClick:()=>S("/commit"),className:"vscode-chat-tool-btn",children:[c.jsx(Xl,{size:11}),c.jsx("span",{children:"/commit"})]})]}),c.jsxs("div",{className:"vscode-chat-history",children:[f.map((y,R)=>{const $=y.role==="user";return c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[c.jsx("span",{className:"vscode-chat-msg-header",style:{color:$?"#75beff":"#da70d6"},children:$?"VOCÊ":"OPALACODER"}),c.jsx("div",{className:"vscode-chat-msg-content",children:uC(y.content)})]},R)}),E&&c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[c.jsx("span",{className:"vscode-chat-msg-header",style:{color:"#da70d6"},children:"OPALACODER"}),c.jsx("div",{className:"vscode-chat-msg-content",children:c.jsxs("div",{className:"thinking-indicator",children:[c.jsx("span",{className:"dot"}),c.jsx("span",{className:"dot"}),c.jsx("span",{className:"dot"})]})})]}),c.jsx("div",{ref:ru})]}),c.jsx("form",{onSubmit:eg,className:"vscode-chat-form",children:c.jsxs("div",{className:"vscode-chat-input-row",children:[c.jsx("input",{type:"text",value:m,onChange:y=>S(y.target.value),disabled:!i||E,placeholder:i?E?"Pensando...":"Pergunte ao OpalaCoder...":"Defina um projeto...",style:{flex:1}}),c.jsx("button",{type:"submit",disabled:!i||E||!m.trim(),className:"vscode-button",style:{padding:"6px"},children:c.jsx(Fy,{size:14})})]})})]})]}),c.jsxs("footer",{className:"vscode-statusbar",children:[c.jsxs("div",{className:"flex items-center",style:{gap:"16px"},children:[c.jsxs("div",{className:"flex items-center",style:{gap:"6px"},children:[c.jsx(Yy,{size:11}),c.jsx("span",{style:{fontWeight:"bold"},children:i?`Workspace: ${i.project_name||i.name}`:"Sem Workspace"})]}),E&&c.jsxs("span",{className:"flex items-center",style:{gap:"6px"},children:[c.jsx("span",{style:{width:"6px",height:"6px",backgroundColor:"#ffffff",borderRadius:"50%",display:"inline-block"}}),c.jsx("span",{style:{fontWeight:"bold"},children:"OpalaCoder Ativo..."})]})]}),c.jsxs("div",{className:"flex items-center",style:{gap:"12px"},children:[c.jsx("span",{children:"UTF-8"}),c.jsx("span",{children:"LF"}),c.jsx("span",{children:"JSON IPC Bridge"})]})]}),Wm&&c.jsx("div",{className:"vscode-modal-overlay",children:c.jsxs("div",{className:"vscode-modal",children:[c.jsxs("div",{className:"vscode-sidebar-header",style:{padding:"10px 16px"},children:[c.jsx("span",{className:"vscode-sidebar-title",style:{color:"#ffffff"},children:"REGISTRAR NOVO PROJETO"}),c.jsx("button",{onClick:()=>yn(!1),style:{background:"transparent",border:"none",cursor:"pointer",color:"#a0a0a0"},children:c.jsx(us,{size:14})})]}),c.jsxs("form",{onSubmit:Gm,className:"flex flex-col",style:{padding:"16px",gap:"12px"},children:[c.jsxs("div",{className:"flex flex-col",style:{gap:"4px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Nome do Projeto *"}),c.jsx("input",{type:"text",value:Sn,onChange:y=>qc(y.target.value),placeholder:"Ex: Meu Servidor Web",required:!0})]}),c.jsxs("div",{className:"flex flex-col",style:{gap:"4px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Caminho Absoluto *"}),c.jsx("input",{type:"text",value:vl,onChange:y=>Yc(y.target.value),placeholder:"Ex: /home/gilzamir/projetos/meu-app",required:!0})]}),c.jsxs("div",{className:"flex flex-col",style:{gap:"4px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Descrição"}),c.jsx("textarea",{value:Xc,onChange:y=>Gc(y.target.value),placeholder:"Descritivo do projeto...",rows:2,style:{resize:"none"}})]}),c.jsxs("div",{style:{display:"flex",gap:"12px"},children:[c.jsxs("div",{className:"flex flex-col flex-1",style:{gap:"4px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Chave de API (Opcional)"}),c.jsx("input",{type:"password",value:Zc,onChange:y=>eu(y.target.value),placeholder:"Ex: sk-..."})]}),c.jsxs("div",{className:"flex flex-col flex-1",style:{gap:"4px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"URL Base da API (Opcional)"}),c.jsx("input",{type:"text",value:tu,onChange:y=>iu(y.target.value),placeholder:"Ex: http://localhost:11434/v1"})]})]}),c.jsxs("div",{style:{fontSize:"11px",color:"#808080",marginTop:"-6px",lineHeight:"1.4"},children:["Dica: Para usar o Ollama local com ",c.jsx("strong",{children:"ollama/ministral-3:14b"}),", informe a URL Base acima (ex: ",c.jsx("code",{children:"http://localhost:11434/v1"}),") e digite/selecione o modelo correspondente."]}),c.jsxs("div",{style:{display:"flex",gap:"12px"},children:[c.jsxs("div",{className:"flex flex-col flex-1",style:{gap:"4px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Modelo de IA"}),c.jsx("input",{type:"text",list:"default-models",value:Qc,onChange:y=>Hm(y.target.value),placeholder:"Selecione ou digite o modelo (ex: ollama/ministral-3:14b)"}),c.jsxs("datalist",{id:"default-models",children:[c.jsx("option",{value:"gemini/gemini-2.5-flash"}),c.jsx("option",{value:"gemini/gemini-2.5-pro"}),c.jsx("option",{value:"openai/gpt-4o"}),c.jsx("option",{value:"ollama/ministral-3:14b"})]})]}),c.jsxs("div",{className:"flex flex-col flex-1",style:{gap:"4px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Modo de Execução"}),c.jsxs("select",{value:Jc,onChange:y=>Um(y.target.value),children:[c.jsx("option",{value:"auto",children:"Auto (Completo)"}),c.jsx("option",{value:"plan",children:"Plan (Planejar)"}),c.jsx("option",{value:"edit",children:"Edit (Editar)"})]})]})]}),c.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",paddingTop:"12px",borderTop:"1px solid #3c3c3c",marginTop:"4px"},children:[c.jsx("button",{type:"button",onClick:()=>yn(!1),className:"vscode-button",style:{backgroundColor:"#3c3c3c",color:"#ffffff"},children:"Cancelar"}),c.jsx("button",{type:"submit",className:"vscode-button",children:"Registrar"})]})]})]})}),ml&&c.jsxs("div",{className:"vscode-context-menu",style:{top:`${ml.y}px`,left:`${ml.x}px`},children:[c.jsxs("div",{className:"vscode-context-menu-item",onClick:qm,children:[c.jsx(Ed,{size:13,style:{color:"#007acc"}}),c.jsx("span",{children:"New File..."})]}),o&&c.jsxs("div",{className:"vscode-context-menu-item",onClick:Ym,children:[c.jsx(Md,{size:13,style:{color:"#f48771"}}),c.jsx("span",{children:"Delete File"})]})]}),Ve&&c.jsx("div",{className:"vscode-modal-overlay",children:c.jsxs("div",{className:"vscode-modal",style:{maxWidth:"520px",width:"92%"},children:[c.jsxs("div",{className:"vscode-sidebar-header",style:{padding:"10px 16px"},children:[c.jsxs("span",{className:"vscode-sidebar-title",style:{color:"#ffffff",display:"flex",alignItems:"center",gap:"8px"},children:[c.jsx(Hn,{size:14,style:{color:"#007acc"}}),"CONFIGURAÇÕES DO PROJETO"]}),c.jsx("button",{onClick:()=>qt(null),style:{background:"transparent",border:"none",cursor:"pointer",color:"#a0a0a0"},children:c.jsx(us,{size:14})})]}),c.jsxs("form",{onSubmit:Zm,className:"flex flex-col",style:{padding:"16px",gap:"14px"},children:[c.jsxs("div",{className:"flex flex-col",style:{gap:"4px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"ID Interno (somente leitura)"}),c.jsx("input",{type:"text",value:Ve.name,readOnly:!0,style:{opacity:.5,cursor:"not-allowed"}})]}),c.jsxs("div",{className:"flex flex-col",style:{gap:"4px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Nome de Exibição *"}),c.jsx("input",{type:"text",value:Ve.project_name,onChange:y=>qt(R=>({...R,project_name:y.target.value})),required:!0,placeholder:"Nome do projeto"})]}),c.jsxs("div",{className:"flex flex-col",style:{gap:"4px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Caminho Absoluto"}),c.jsx("input",{type:"text",value:Ve.project_path,onChange:y=>qt(R=>({...R,project_path:y.target.value})),placeholder:"/caminho/absoluto/do/projeto"})]}),c.jsxs("div",{style:{display:"flex",gap:"12px"},children:[c.jsxs("div",{className:"flex flex-col flex-1",style:{gap:"4px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Modelo Principal"}),c.jsx("input",{type:"text",list:"edit-models",value:Ve.model,onChange:y=>qt(R=>({...R,model:y.target.value})),placeholder:"gemini/gemini-2.5-flash"}),c.jsxs("datalist",{id:"edit-models",children:[c.jsx("option",{value:"gemini/gemini-2.5-flash"}),c.jsx("option",{value:"gemini/gemini-2.5-pro"}),c.jsx("option",{value:"openai/gpt-4o"}),c.jsx("option",{value:"ollama/ministral-3:14b"})]})]}),c.jsxs("div",{className:"flex flex-col flex-1",style:{gap:"4px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Modo"}),c.jsxs("select",{value:Ve.mode,onChange:y=>qt(R=>({...R,mode:y.target.value})),children:[c.jsx("option",{value:"auto",children:"Auto (Completo)"}),c.jsx("option",{value:"plan",children:"Plan (Planejar)"}),c.jsx("option",{value:"edit",children:"Edit (Editar)"})]})]})]}),c.jsxs("div",{className:"flex flex-col",style:{gap:"4px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Modelo Alternativo"}),c.jsx("input",{type:"text",list:"edit-alt-models",value:Ve.alternative_model,onChange:y=>qt(R=>({...R,alternative_model:y.target.value})),placeholder:"(usa o padrão global se vazio)"}),c.jsxs("datalist",{id:"edit-alt-models",children:[c.jsx("option",{value:"gemini/gemini-2.5-flash"}),c.jsx("option",{value:"openai/gpt-4o-mini"}),c.jsx("option",{value:"ollama/gemma3:4b"})]})]}),c.jsxs("div",{className:"flex flex-col",style:{gap:"4px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Descrição"}),c.jsx("textarea",{value:Ve.description,onChange:y=>qt(R=>({...R,description:y.target.value})),placeholder:"Descrição opcional do projeto...",rows:2,style:{resize:"none"}})]}),c.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",paddingTop:"12px",borderTop:"1px solid #3c3c3c",marginTop:"4px"},children:[c.jsx("button",{type:"button",onClick:()=>qt(null),className:"vscode-button",style:{backgroundColor:"#3c3c3c",color:"#ffffff"},children:"Cancelar"}),c.jsxs("button",{type:"submit",className:"vscode-button",children:[c.jsx(Xl,{size:12}),"Salvar Alterações"]})]})]})]})}),vn&&c.jsx("div",{style:{position:"fixed",inset:0,zIndex:1e3,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(0,0,0,0.55)",backdropFilter:"blur(4px)",animation:"fadeIn 0.15s ease"},children:c.jsxs("div",{style:{background:"linear-gradient(135deg, #1e1e2e 0%, #252537 100%)",border:"1px solid #3c3c5c",borderRadius:"12px",padding:"28px 32px",maxWidth:"420px",width:"90%",boxShadow:"0 24px 64px rgba(0,0,0,0.6)"},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",marginBottom:"16px"},children:[c.jsx("span",{style:{fontSize:"22px"},children:"🔔"}),c.jsx("span",{style:{fontSize:"12px",fontWeight:700,color:"#a0a0c0",letterSpacing:"0.1em",textTransform:"uppercase"},children:"Confirmação Necessária"})]}),c.jsx("p",{style:{fontSize:"14px",color:"#e0e0f0",lineHeight:1.6,marginBottom:"24px",margin:"0 0 24px 0"},children:vn.prompt}),c.jsxs("div",{style:{display:"flex",gap:"12px",justifyContent:"flex-end"},children:[c.jsx("button",{id:"confirm-no-btn",onClick:()=>au("no"),style:{padding:"8px 20px",borderRadius:"8px",border:"1px solid #4c4c6c",background:"transparent",color:"#a0a0c0",cursor:"pointer",fontSize:"13px",fontWeight:600,transition:"all 0.15s"},onMouseEnter:y=>{y.target.style.background="#2c2c3c",y.target.style.color="#e0e0f0"},onMouseLeave:y=>{y.target.style.background="transparent",y.target.style.color="#a0a0c0"},children:"Não"}),c.jsx("button",{id:"confirm-yes-btn",onClick:()=>au("yes"),style:{padding:"8px 24px",borderRadius:"8px",border:"none",background:"linear-gradient(135deg, #007acc, #0062a3)",color:"#fff",cursor:"pointer",fontSize:"13px",fontWeight:700,boxShadow:"0 4px 16px rgba(0,122,204,0.35)",transition:"all 0.15s"},onMouseEnter:y=>{y.target.style.background="linear-gradient(135deg, #0090f0, #007acc)"},onMouseLeave:y=>{y.target.style.background="linear-gradient(135deg, #007acc, #0062a3)"},children:"Sim"})]})]})}),I&&c.jsx("div",{className:"vscode-modal-overlay",children:c.jsxs("div",{className:"vscode-modal",style:{maxWidth:"440px",width:"90%"},children:[c.jsxs("div",{className:"vscode-sidebar-header",style:{padding:"10px 16px"},children:[c.jsxs("span",{className:"vscode-sidebar-title",style:{color:"#ffffff",display:"flex",alignItems:"center",gap:"8px"},children:[c.jsx(Hn,{size:14,style:{color:"#007acc"}}),"CONFIGURAÇÕES DA IDE"]}),c.jsx("button",{onClick:()=>b(!1),style:{background:"transparent",border:"none",cursor:"pointer",color:"#a0a0a0"},children:c.jsx(us,{size:14})})]}),c.jsxs("div",{style:{display:"flex",borderBottom:"1px solid var(--vscode-border)",backgroundColor:"var(--vscode-tab-inactive-bg)"},children:[c.jsx("button",{onClick:()=>K("preferences"),style:{flex:1,padding:"8px",background:T==="preferences"?"var(--vscode-tab-active-bg)":"transparent",border:"none",borderBottom:T==="preferences"?"2px solid var(--vscode-active-border)":"none",color:T==="preferences"?"#ffffff":"#808080",fontWeight:"bold",fontSize:"11px",textTransform:"uppercase",cursor:"pointer"},children:"Preferências"}),c.jsx("button",{onClick:()=>K("about"),style:{flex:1,padding:"8px",background:T==="about"?"var(--vscode-tab-active-bg)":"transparent",border:"none",borderBottom:T==="about"?"2px solid var(--vscode-active-border)":"none",color:T==="about"?"#ffffff":"#808080",fontWeight:"bold",fontSize:"11px",textTransform:"uppercase",cursor:"pointer"},children:"Sobre"})]}),c.jsx("div",{className:"flex flex-col",style:{padding:"16px",gap:"14px"},children:T==="preferences"?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex flex-col",style:{gap:"6px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Tema de Cor"}),c.jsxs("select",{value:C,onChange:y=>j(y.target.value),style:{width:"100%"},children:[c.jsx("option",{value:"dark",children:"Escuro (Dark Mode)"}),c.jsx("option",{value:"light",children:"Claro (Light Mode)"})]})]}),c.jsxs("div",{className:"flex flex-col",style:{gap:"6px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Tamanho da Fonte do Editor"}),c.jsx("input",{type:"number",min:"10",max:"30",value:U,onChange:y=>{const R=Number(y.target.value);H(R),Qn("editorFontSize",R)},style:{width:"100%"}})]}),c.jsxs("div",{className:"flex flex-col",style:{gap:"6px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Tamanho do Tab (Espaços)"}),c.jsxs("select",{value:V,onChange:y=>{const R=Number(y.target.value);te(R),Qn("editorTabSize",R)},style:{width:"100%"},children:[c.jsx("option",{value:2,children:"2 Espaços"}),c.jsx("option",{value:4,children:"4 Espaços"}),c.jsx("option",{value:8,children:"8 Espaços"})]})]}),c.jsxs("div",{className:"flex flex-col",style:{gap:"6px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Quebra Automática de Linha (Word Wrap)"}),c.jsxs("select",{value:re,onChange:y=>{pe(y.target.value),Qn("editorWordWrap",y.target.value)},style:{width:"100%"},children:[c.jsx("option",{value:"on",children:"Ativado (On)"}),c.jsx("option",{value:"off",children:"Desativado (Off)"})]})]})]}):c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"14px",color:"#cccccc"},children:[c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[c.jsx("span",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Versão"}),c.jsx("span",{style:{fontSize:"13px",fontWeight:"bold",color:"#ffffff"},children:"0.1.4 alfa"})]}),c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[c.jsx("span",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Autor"}),c.jsx("span",{style:{fontSize:"13px",color:"#ffffff"},children:"dev@opala.com"})]}),c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[c.jsx("span",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Licença"}),c.jsx("span",{style:{fontSize:"13px",color:"#ffffff"},children:"MIT"})]})]})}),c.jsx("div",{style:{display:"flex",justifyContent:"flex-end",padding:"12px 16px",gap:"8px",borderTop:"1px solid var(--vscode-border)",backgroundColor:"var(--vscode-sidebar-bg)"},children:c.jsx("button",{onClick:()=>b(!1),className:"vscode-button",children:"Fechar"})})]})})]})}function Im({node:e,selectedFile:t,handleFileSelect:i}){const r=e.isDirectory,[s,n]=D.useState(!1);if(r)return c.jsxs("div",{className:"select-none",children:[c.jsxs("div",{onClick:()=>n(!s),className:"vscode-tree-node",children:[s?c.jsx(Wy,{size:14}):c.jsx(Hy,{size:14}),c.jsx(Vy,{size:14,className:"text-white",style:{color:"#e8a838"}}),c.jsx("span",{className:"truncate",children:e.name})]}),s&&c.jsx("div",{style:{paddingLeft:"12px",borderLeft:"1px solid #3c3c3c",marginLeft:"14px"},children:e.children.map(l=>c.jsx(Im,{node:l,selectedFile:t,handleFileSelect:i},l.path))})]});const o=t===e.path;return c.jsxs("div",{onClick:()=>i(e.path),className:`vscode-tree-node ${o?"active":""}`,children:[c.jsx(Ky,{size:13,style:{color:"#a0a0a0"}}),c.jsx("span",{className:"truncate",children:e.name})]})}function uC(e){return e?e.split(`
|
|
205
|
+
`);zt=It.pop();for(const Yt of It)if(Yt.trim())try{const _t=JSON.parse(Yt);lu(_t)}catch{X("stdout",Yt)}}if(zt.trim())try{const qe=JSON.parse(zt);lu(qe)}catch{X("stdout",zt)}}catch($){X("error",`Falha na execução: ${$.message}`)}finally{_(!1),xn()}},lu=y=>{const{event:R,...$}=y;switch(R){case"server_ready":X("info","Agente pronto.");break;case"agent_started":X("info",`Agente ${$.agent} iniciado.`);break;case"thought":X("thought",$.content);break;case"tool_call":X("tool_call",`Chamando: ${$.tool} (${JSON.stringify($.arguments)})`);break;case"tool_result":X("tool_result",`Sucesso: ${$.tool}`);break;case"agent_response":X("info","Resposta recebida."),g(ne=>{const pt=ne[ne.length-1];return pt&&pt.role==="assistant"&&pt.content===$.response?(X("info","Duplicate assistant message ignored."),ne):[...ne,{role:"assistant",content:$.response}]});break;case"agent_finished":X("info","Processamento concluído.");break;case"input_request":Vc({id:$.id,prompt:$.prompt,options:$.options||["yes","no"],default:$.default||"yes"}),X("info",`🔔 Aguardando confirmação: ${$.prompt}`);break;case"error":X("error",$.message);break;case"problem":X("error",`[Problema em ${$.tool}]: ${$.message}`),M(ne=>[...ne,{id:Math.random().toString(),tool:$.tool,message:$.message,severity:$.severity||"error",timestamp:new Date().toLocaleTimeString()}]);break;default:X("info",`Evento: ${R}`)}},au=async y=>{if(!vn)return;const{id:R,prompt:$}=vn;Vc(null),X("info",`✅ Confirmação: "${$}" → ${y}`);try{await fetch("/api/opalacoder/input_response",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:R,value:y})})}catch(ne){X("error",`Erro ao enviar confirmação: ${ne.message}`)}},tg=y=>{if(!y)return"plaintext";const R=y.split(".").pop().toLowerCase();return{py:"python",js:"javascript",jsx:"javascript",ts:"typescript",tsx:"typescript",html:"html",css:"css",json:"json",md:"markdown",yml:"yaml",yaml:"yaml",sh:"shell"}[R]||"plaintext"};return c.jsxs("div",{className:"vscode-app",children:[c.jsxs("div",{className:"vscode-main",children:[c.jsxs("div",{className:"vscode-activitybar",children:[c.jsxs("div",{className:"vscode-activitybar-top",children:[c.jsx("button",{onClick:()=>q("explorer"),className:`vscode-activitybar-btn ${O==="explorer"?"active":""}`,title:"Explorer",children:c.jsx(bd,{size:22})}),c.jsxs("button",{onClick:()=>q("git"),className:`vscode-activitybar-btn ${O==="git"?"active":""}`,title:"Source Control",style:{position:"relative"},children:[c.jsx(qy,{size:22}),le.length>0&&c.jsx("span",{style:{position:"absolute",top:"4px",right:"4px",background:"#007acc",color:"#ffffff",borderRadius:"50%",width:"16px",height:"16px",fontSize:"9px",fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 0 4px rgba(0,0,0,0.5)"},children:le.length})]}),c.jsx("button",{onClick:()=>L(!P),className:`vscode-activitybar-btn ${P?"active":""}`,title:"Copilot Chat",children:c.jsx(kd,{size:22})})]}),c.jsx("div",{children:c.jsx("button",{onClick:()=>b(!0),className:"vscode-activitybar-btn",title:"Settings",children:c.jsx(Hn,{size:20})})})]}),c.jsx("aside",{className:"vscode-sidebar",style:{width:`${Hc}px`},children:O==="explorer"?c.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[c.jsxs("div",{className:"vscode-sidebar-header",children:[c.jsx("span",{className:"vscode-sidebar-title",children:"EXPLORER: PROJECTS"}),c.jsx("button",{onClick:()=>yn(!0),style:{background:"transparent",border:"none",cursor:"pointer",color:"#c5c5c5"},title:"Novo Projeto...",children:c.jsx(Ed,{size:14})})]}),c.jsxs("div",{className:"vscode-sidebar-section",children:[c.jsx("div",{className:"vscode-sidebar-section-title",children:"Selecione o Projeto"}),c.jsx("div",{className:"overflow-y-auto",style:{maxHeight:"140px"},children:e.map(y=>{const R=i&&i.name===y.name;return c.jsxs("div",{onClick:()=>nu(y),className:`vscode-project-item ${R?"active":""}`,children:[c.jsxs("div",{className:"truncate flex-1",children:[c.jsx("div",{style:{fontSize:"13px",fontWeight:"500"},className:"truncate",children:y.project_name||y.name}),c.jsx("div",{style:{fontSize:"10px",color:"#808080"},className:"truncate",children:y.project_path})]}),c.jsx("button",{onClick:$=>Jm($,y),style:{background:"transparent",border:"none",cursor:"pointer",color:"#a0a0a0",padding:"2px 4px"},title:"Configurar projeto",children:c.jsx(Hn,{size:12})}),c.jsx("button",{onClick:$=>{$.stopPropagation(),Qm(y.name)},style:{background:"transparent",border:"none",cursor:"pointer",color:"#a0a0a0",padding:"2px 4px"},title:"Remover projeto",children:c.jsx(Md,{size:12})})]},y.name)})})]}),c.jsxs("div",{className:"vscode-sidebar-content",onContextMenu:Vm,children:[c.jsx("div",{className:"vscode-sidebar-section-title",children:"Workspace Files"}),s.length===0?c.jsx("div",{style:{fontSize:"12px",color:"#808080",padding:"0 4px",fontStyle:"italic"},children:"Selecione um projeto para explorar."}):c.jsx("div",{children:s.map(y=>c.jsx(Im,{node:y,selectedFile:o,handleFileSelect:Xm},y.path))})]})]}):c.jsxs("div",{className:"vscode-sidebar-content",style:{padding:"12px",display:"flex",flexDirection:"column",height:"100%",gap:"16px"},children:[c.jsx("div",{className:"vscode-sidebar-title",children:"SOURCE CONTROL (GIT)"}),i?le.length===0?c.jsx("div",{style:{fontSize:"12px",color:"#808080",fontStyle:"italic"},children:"Sem alterações locais."}):c.jsxs("div",{className:"flex flex-col flex-1 overflow-hidden",style:{gap:"16px"},children:[c.jsxs("form",{onSubmit:Km,className:"flex flex-col",style:{gap:"8px"},children:[c.jsx("input",{type:"text",placeholder:"Mensagem do Commit...",value:oi,onChange:y=>At(y.target.value),required:!0,style:{width:"100%",fontSize:"12px"}}),c.jsx("button",{type:"submit",className:"vscode-button",disabled:wi||!oi.trim(),style:{width:"100%"},children:wi?"Commit...":"Commit"})]}),c.jsxs("div",{className:"flex-1 overflow-y-auto",style:{borderTop:"1px solid var(--vscode-border)",paddingTop:"12px"},children:[c.jsxs("div",{className:"vscode-sidebar-section-title",style:{marginBottom:"8px",padding:0},children:["Modificações (",le.length,")"]}),c.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:le.map((y,R)=>{let $="#cccccc",ne=y.status;return y.status==="M"?($="#e2b52b",ne="M"):y.status==="??"||y.status==="A"?($="#73c991",ne="U"):y.status==="D"&&($="#f48771",ne="D"),c.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"12px",padding:"4px 6px",borderRadius:"3px",background:"rgba(255,255,255,0.02)"},children:[c.jsx("span",{className:"truncate",title:y.path,style:{color:"#cccccc",flex:1,marginRight:"8px"},children:y.path}),c.jsx("span",{style:{fontWeight:"bold",color:$,fontSize:"11px",minWidth:"12px",textAlign:"center"},children:ne})]},R)})})]})]}):c.jsx("div",{style:{fontSize:"12px",color:"#808080",fontStyle:"italic"},children:"Selecione um projeto para ver as alterações Git."})]})}),c.jsx("div",{className:"vscode-resizer-horizontal",onMouseDown:y=>gl(y,"left")}),c.jsxs("main",{className:"vscode-editor-panel",children:[o?c.jsxs("div",{className:"vscode-editor-panel",children:[c.jsxs("div",{className:"vscode-tabs",children:[c.jsx("div",{className:"flex h-full",children:c.jsxs("div",{className:"vscode-tab",children:[c.jsx("span",{style:{color:"#ffffff"},children:o.split("/").pop()}),c.jsx("button",{onClick:()=>l(null),className:"vscode-tab-close-btn",children:c.jsx(us,{size:12})})]})}),c.jsx("div",{children:c.jsxs("button",{onClick:ou,disabled:d,className:"vscode-button",children:[d?c.jsx(Pd,{size:12,className:"animate-spin"}):c.jsx(Xl,{size:12}),c.jsx("span",{children:d?"Salvando...":"Salvar (Ctrl+S)"})]})})]}),c.jsx("div",{className:"vscode-editor-container",children:c.jsx(zy,{height:"100%",language:tg(o),theme:C==="light"?"light":"vs-dark",value:h,onChange:y=>a(y),options:{minimap:{enabled:!0},fontSize:U,lineNumbers:"on",tabSize:V,wordWrap:re,automaticLayout:!0}})})]}):c.jsx("div",{className:"vscode-editor-container",style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:c.jsxs("div",{style:{textAlign:"center"},children:[c.jsx(bd,{size:64,style:{color:"#3c3c3c",marginBottom:"16px"}}),c.jsx("h3",{style:{fontSize:"14px",fontWeight:"bold",color:"#b0b0b0",marginBottom:"4px"},children:"Nenhum Arquivo Aberto"}),c.jsx("p",{style:{fontSize:"12px",color:"#808080"},children:"Abra um arquivo na barra lateral esquerda."})]})}),!w&&c.jsx("div",{className:"vscode-resizer-vertical",onMouseDown:y=>gl(y,"bottom")}),c.jsxs("div",{className:"vscode-bottom-panel",style:{height:w?"30px":`${_l}px`},children:[c.jsxs("div",{className:"vscode-bottom-tabs",children:[c.jsxs("div",{className:"vscode-bottom-tab-list",children:[c.jsx("span",{className:`vscode-bottom-tab ${A==="output"?"active":""}`,onClick:()=>yl("output"),children:"OUTPUT (OPALACODER)"}),c.jsxs("span",{className:`vscode-bottom-tab ${A==="problems"?"active":""}`,onClick:()=>yl("problems"),children:["PROBLEMS ",z.length>0&&c.jsx("span",{style:{marginLeft:"4px",background:"#f48771",color:"#1e1e1e",borderRadius:"10px",padding:"0 6px",fontSize:"10px",fontWeight:"bold"},children:z.length})]}),c.jsx("span",{className:`vscode-bottom-tab ${A==="terminal"?"active":""}`,onClick:()=>yl("terminal"),children:"TERMINAL"})]}),c.jsx("button",{onClick:()=>x(!w),style:{background:"transparent",border:"none",cursor:"pointer",color:"#a0a0a0"},children:w?c.jsx(Xy,{size:12}):c.jsx(Gy,{size:12})})]}),!w&&c.jsxs("div",{style:{height:"calc(100% - 30px)",width:"100%"},children:[A==="output"&&c.jsxs("div",{className:"vscode-logs",style:{height:"100%"},children:[p.length===0?c.jsx("div",{style:{color:"#808080",fontStyle:"italic"},children:"Nenhum log gerado. Envie uma instrução no chat para iniciar..."}):p.map((y,R)=>{let $="text-[#cccccc]",ne="SYSTEM";return y.type==="error"?($="text-[#f48771] font-semibold",ne="ERROR"):y.type==="info"?($="text-[#75beff]",ne="INFO"):y.type==="thought"?($="text-[#da70d6] italic",ne="THOUGHT"):y.type==="tool_call"?($="text-[#d7ba7d]",ne="TOOL"):y.type==="tool_result"&&($="text-[#89d4a5]",ne="RESULT"),c.jsxs("div",{className:$,style:{display:"flex",alignItems:"flex-start",gap:"6px",marginBottom:"3px"},children:[c.jsxs("span",{style:{color:"#5a5a5a"},children:["[",y.timestamp,"]"]}),c.jsxs("span",{style:{fontWeight:"bold"},children:["[",ne,"]"]}),c.jsx("span",{style:{whiteSpace:"pre-wrap",flex:1},children:y.message})]},R)}),c.jsx("div",{ref:su})]}),A==="problems"&&c.jsx("div",{className:"vscode-problems-list",style:{padding:"8px",overflowY:"auto",height:"100%",color:"#cccccc",fontFamily:"Consolas, monospace",fontSize:"12px"},children:z.length===0?c.jsx("div",{style:{color:"#808080",fontStyle:"italic",padding:"8px"},children:"Nenhum problema detectado."}):z.map(y=>c.jsxs("div",{style:{display:"flex",gap:"8px",alignItems:"flex-start",borderBottom:"1px solid #2d2d2d",padding:"6px 0"},children:[c.jsx(Uy,{size:14,className:"text-[#f48771]",style:{flexShrink:0,marginTop:"2px"}}),c.jsxs("div",{children:[c.jsxs("div",{style:{fontWeight:"bold",color:"#f48771",marginBottom:"2px"},children:["[",y.timestamp,"] Erro em ",y.tool,":"]}),c.jsx("pre",{style:{whiteSpace:"pre-wrap",margin:0,color:"#e0e0e0",fontSize:"12px",fontFamily:"inherit"},children:y.message})]})]},y.id))}),c.jsx("div",{style:{display:A==="terminal"?"block":"none",height:"100%",background:"#1e1e1e",overflow:"hidden"},children:i?c.jsx("div",{ref:lt,style:{width:"100%",height:"100%",padding:"4px"}}):c.jsx("div",{style:{color:"#808080",fontStyle:"italic",padding:"16px"},children:"Defina um projeto/workspace para habilitar o terminal."})})]})]})]}),P&&c.jsx("div",{className:"vscode-resizer-horizontal",onMouseDown:y=>gl(y,"right")}),P&&c.jsxs("aside",{className:"vscode-chat",style:{width:`${Uc}px`},children:[c.jsxs("div",{className:"vscode-chat-header",children:[c.jsxs("span",{className:"vscode-sidebar-title",style:{display:"flex",alignItems:"center",gap:"6px"},children:[c.jsx(kd,{size:12,style:{color:"#007acc"}}),c.jsx("span",{children:"COPILOT CHAT"})]}),c.jsx("button",{onClick:()=>L(!1),style:{background:"transparent",border:"none",cursor:"pointer",color:"#a0a0a0"},children:c.jsx(us,{size:14})})]}),c.jsxs("div",{className:"vscode-chat-toolbar",children:[c.jsxs("button",{onClick:()=>S("/undo"),className:"vscode-chat-tool-btn",children:[c.jsx(Qy,{size:11}),c.jsx("span",{children:"/undo"})]}),c.jsxs("button",{onClick:()=>S("/clear"),className:"vscode-chat-tool-btn",children:[c.jsx(Pd,{size:11}),c.jsx("span",{children:"/clear"})]}),c.jsxs("button",{onClick:()=>S("/commit"),className:"vscode-chat-tool-btn",children:[c.jsx(Xl,{size:11}),c.jsx("span",{children:"/commit"})]})]}),c.jsxs("div",{className:"vscode-chat-history",children:[f.map((y,R)=>{const $=y.role==="user";return c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[c.jsx("span",{className:"vscode-chat-msg-header",style:{color:$?"#75beff":"#da70d6"},children:$?"VOCÊ":"OPALACODER"}),c.jsx("div",{className:"vscode-chat-msg-content",children:uC(y.content)})]},R)}),E&&c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[c.jsx("span",{className:"vscode-chat-msg-header",style:{color:"#da70d6"},children:"OPALACODER"}),c.jsx("div",{className:"vscode-chat-msg-content",children:c.jsxs("div",{className:"thinking-indicator",children:[c.jsx("span",{className:"dot"}),c.jsx("span",{className:"dot"}),c.jsx("span",{className:"dot"})]})})]}),c.jsx("div",{ref:ru})]}),c.jsx("form",{onSubmit:eg,className:"vscode-chat-form",children:c.jsxs("div",{className:"vscode-chat-input-row",children:[c.jsx("input",{type:"text",value:m,onChange:y=>S(y.target.value),disabled:!i||E,placeholder:i?E?"Pensando...":"Pergunte ao OpalaCoder...":"Defina um projeto...",style:{flex:1}}),c.jsx("button",{type:"submit",disabled:!i||E||!m.trim(),className:"vscode-button",style:{padding:"6px"},children:c.jsx(Fy,{size:14})})]})})]})]}),c.jsxs("footer",{className:"vscode-statusbar",children:[c.jsxs("div",{className:"flex items-center",style:{gap:"16px"},children:[c.jsxs("div",{className:"flex items-center",style:{gap:"6px"},children:[c.jsx(Yy,{size:11}),c.jsx("span",{style:{fontWeight:"bold"},children:i?`Workspace: ${i.project_name||i.name}`:"Sem Workspace"})]}),E&&c.jsxs("span",{className:"flex items-center",style:{gap:"6px"},children:[c.jsx("span",{style:{width:"6px",height:"6px",backgroundColor:"#ffffff",borderRadius:"50%",display:"inline-block"}}),c.jsx("span",{style:{fontWeight:"bold"},children:"OpalaCoder Ativo..."})]})]}),c.jsxs("div",{className:"flex items-center",style:{gap:"12px"},children:[c.jsx("span",{children:"UTF-8"}),c.jsx("span",{children:"LF"}),c.jsx("span",{children:"JSON IPC Bridge"})]})]}),Wm&&c.jsx("div",{className:"vscode-modal-overlay",children:c.jsxs("div",{className:"vscode-modal",children:[c.jsxs("div",{className:"vscode-sidebar-header",style:{padding:"10px 16px"},children:[c.jsx("span",{className:"vscode-sidebar-title",style:{color:"#ffffff"},children:"REGISTRAR NOVO PROJETO"}),c.jsx("button",{onClick:()=>yn(!1),style:{background:"transparent",border:"none",cursor:"pointer",color:"#a0a0a0"},children:c.jsx(us,{size:14})})]}),c.jsxs("form",{onSubmit:Gm,className:"flex flex-col",style:{padding:"16px",gap:"12px"},children:[c.jsxs("div",{className:"flex flex-col",style:{gap:"4px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Nome do Projeto *"}),c.jsx("input",{type:"text",value:Sn,onChange:y=>qc(y.target.value),placeholder:"Ex: Meu Servidor Web",required:!0})]}),c.jsxs("div",{className:"flex flex-col",style:{gap:"4px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Caminho Absoluto *"}),c.jsx("input",{type:"text",value:vl,onChange:y=>Yc(y.target.value),placeholder:"Ex: /home/gilzamir/projetos/meu-app",required:!0})]}),c.jsxs("div",{className:"flex flex-col",style:{gap:"4px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Descrição"}),c.jsx("textarea",{value:Xc,onChange:y=>Gc(y.target.value),placeholder:"Descritivo do projeto...",rows:2,style:{resize:"none"}})]}),c.jsxs("div",{style:{display:"flex",gap:"12px"},children:[c.jsxs("div",{className:"flex flex-col flex-1",style:{gap:"4px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Chave de API (Opcional)"}),c.jsx("input",{type:"password",value:Zc,onChange:y=>eu(y.target.value),placeholder:"Ex: sk-..."})]}),c.jsxs("div",{className:"flex flex-col flex-1",style:{gap:"4px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"URL Base da API (Opcional)"}),c.jsx("input",{type:"text",value:tu,onChange:y=>iu(y.target.value),placeholder:"Ex: http://localhost:11434/v1"})]})]}),c.jsxs("div",{style:{fontSize:"11px",color:"#808080",marginTop:"-6px",lineHeight:"1.4"},children:["Dica: Para usar o Ollama local com ",c.jsx("strong",{children:"ollama/ministral-3:14b"}),", informe a URL Base acima (ex: ",c.jsx("code",{children:"http://localhost:11434/v1"}),") e digite/selecione o modelo correspondente."]}),c.jsxs("div",{style:{display:"flex",gap:"12px"},children:[c.jsxs("div",{className:"flex flex-col flex-1",style:{gap:"4px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Modelo de IA"}),c.jsx("input",{type:"text",list:"default-models",value:Qc,onChange:y=>Hm(y.target.value),placeholder:"Selecione ou digite o modelo (ex: ollama/ministral-3:14b)"}),c.jsxs("datalist",{id:"default-models",children:[c.jsx("option",{value:"gemini/gemini-2.5-flash"}),c.jsx("option",{value:"gemini/gemini-2.5-pro"}),c.jsx("option",{value:"openai/gpt-4o"}),c.jsx("option",{value:"ollama/ministral-3:14b"})]})]}),c.jsxs("div",{className:"flex flex-col flex-1",style:{gap:"4px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Modo de Execução"}),c.jsxs("select",{value:Jc,onChange:y=>Um(y.target.value),children:[c.jsx("option",{value:"auto",children:"Auto (Completo)"}),c.jsx("option",{value:"plan",children:"Plan (Planejar)"}),c.jsx("option",{value:"edit",children:"Edit (Editar)"})]})]})]}),c.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",paddingTop:"12px",borderTop:"1px solid #3c3c3c",marginTop:"4px"},children:[c.jsx("button",{type:"button",onClick:()=>yn(!1),className:"vscode-button",style:{backgroundColor:"#3c3c3c",color:"#ffffff"},children:"Cancelar"}),c.jsx("button",{type:"submit",className:"vscode-button",children:"Registrar"})]})]})]})}),ml&&c.jsxs("div",{className:"vscode-context-menu",style:{top:`${ml.y}px`,left:`${ml.x}px`},children:[c.jsxs("div",{className:"vscode-context-menu-item",onClick:qm,children:[c.jsx(Ed,{size:13,style:{color:"#007acc"}}),c.jsx("span",{children:"New File..."})]}),o&&c.jsxs("div",{className:"vscode-context-menu-item",onClick:Ym,children:[c.jsx(Md,{size:13,style:{color:"#f48771"}}),c.jsx("span",{children:"Delete File"})]})]}),Ve&&c.jsx("div",{className:"vscode-modal-overlay",children:c.jsxs("div",{className:"vscode-modal",style:{maxWidth:"520px",width:"92%"},children:[c.jsxs("div",{className:"vscode-sidebar-header",style:{padding:"10px 16px"},children:[c.jsxs("span",{className:"vscode-sidebar-title",style:{color:"#ffffff",display:"flex",alignItems:"center",gap:"8px"},children:[c.jsx(Hn,{size:14,style:{color:"#007acc"}}),"CONFIGURAÇÕES DO PROJETO"]}),c.jsx("button",{onClick:()=>qt(null),style:{background:"transparent",border:"none",cursor:"pointer",color:"#a0a0a0"},children:c.jsx(us,{size:14})})]}),c.jsxs("form",{onSubmit:Zm,className:"flex flex-col",style:{padding:"16px",gap:"14px"},children:[c.jsxs("div",{className:"flex flex-col",style:{gap:"4px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"ID Interno (somente leitura)"}),c.jsx("input",{type:"text",value:Ve.name,readOnly:!0,style:{opacity:.5,cursor:"not-allowed"}})]}),c.jsxs("div",{className:"flex flex-col",style:{gap:"4px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Nome de Exibição *"}),c.jsx("input",{type:"text",value:Ve.project_name,onChange:y=>qt(R=>({...R,project_name:y.target.value})),required:!0,placeholder:"Nome do projeto"})]}),c.jsxs("div",{className:"flex flex-col",style:{gap:"4px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Caminho Absoluto"}),c.jsx("input",{type:"text",value:Ve.project_path,onChange:y=>qt(R=>({...R,project_path:y.target.value})),placeholder:"/caminho/absoluto/do/projeto"})]}),c.jsxs("div",{style:{display:"flex",gap:"12px"},children:[c.jsxs("div",{className:"flex flex-col flex-1",style:{gap:"4px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Modelo Principal"}),c.jsx("input",{type:"text",list:"edit-models",value:Ve.model,onChange:y=>qt(R=>({...R,model:y.target.value})),placeholder:"gemini/gemini-2.5-flash"}),c.jsxs("datalist",{id:"edit-models",children:[c.jsx("option",{value:"gemini/gemini-2.5-flash"}),c.jsx("option",{value:"gemini/gemini-2.5-pro"}),c.jsx("option",{value:"openai/gpt-4o"}),c.jsx("option",{value:"ollama/ministral-3:14b"})]})]}),c.jsxs("div",{className:"flex flex-col flex-1",style:{gap:"4px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Modo"}),c.jsxs("select",{value:Ve.mode,onChange:y=>qt(R=>({...R,mode:y.target.value})),children:[c.jsx("option",{value:"auto",children:"Auto (Completo)"}),c.jsx("option",{value:"plan",children:"Plan (Planejar)"}),c.jsx("option",{value:"edit",children:"Edit (Editar)"})]})]})]}),c.jsxs("div",{className:"flex flex-col",style:{gap:"4px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Modelo Alternativo"}),c.jsx("input",{type:"text",list:"edit-alt-models",value:Ve.alternative_model,onChange:y=>qt(R=>({...R,alternative_model:y.target.value})),placeholder:"(usa o padrão global se vazio)"}),c.jsxs("datalist",{id:"edit-alt-models",children:[c.jsx("option",{value:"gemini/gemini-2.5-flash"}),c.jsx("option",{value:"openai/gpt-4o-mini"}),c.jsx("option",{value:"ollama/gemma3:4b"})]})]}),c.jsxs("div",{className:"flex flex-col",style:{gap:"4px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Descrição"}),c.jsx("textarea",{value:Ve.description,onChange:y=>qt(R=>({...R,description:y.target.value})),placeholder:"Descrição opcional do projeto...",rows:2,style:{resize:"none"}})]}),c.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",paddingTop:"12px",borderTop:"1px solid #3c3c3c",marginTop:"4px"},children:[c.jsx("button",{type:"button",onClick:()=>qt(null),className:"vscode-button",style:{backgroundColor:"#3c3c3c",color:"#ffffff"},children:"Cancelar"}),c.jsxs("button",{type:"submit",className:"vscode-button",children:[c.jsx(Xl,{size:12}),"Salvar Alterações"]})]})]})]})}),vn&&c.jsx("div",{style:{position:"fixed",inset:0,zIndex:1e3,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(0,0,0,0.55)",backdropFilter:"blur(4px)",animation:"fadeIn 0.15s ease"},children:c.jsxs("div",{style:{background:"linear-gradient(135deg, #1e1e2e 0%, #252537 100%)",border:"1px solid #3c3c5c",borderRadius:"12px",padding:"28px 32px",maxWidth:"420px",width:"90%",boxShadow:"0 24px 64px rgba(0,0,0,0.6)"},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",marginBottom:"16px"},children:[c.jsx("span",{style:{fontSize:"22px"},children:"🔔"}),c.jsx("span",{style:{fontSize:"12px",fontWeight:700,color:"#a0a0c0",letterSpacing:"0.1em",textTransform:"uppercase"},children:"Confirmação Necessária"})]}),c.jsx("p",{style:{fontSize:"14px",color:"#e0e0f0",lineHeight:1.6,marginBottom:"24px",margin:"0 0 24px 0"},children:vn.prompt}),c.jsxs("div",{style:{display:"flex",gap:"12px",justifyContent:"flex-end"},children:[c.jsx("button",{id:"confirm-no-btn",onClick:()=>au("no"),style:{padding:"8px 20px",borderRadius:"8px",border:"1px solid #4c4c6c",background:"transparent",color:"#a0a0c0",cursor:"pointer",fontSize:"13px",fontWeight:600,transition:"all 0.15s"},onMouseEnter:y=>{y.target.style.background="#2c2c3c",y.target.style.color="#e0e0f0"},onMouseLeave:y=>{y.target.style.background="transparent",y.target.style.color="#a0a0c0"},children:"Não"}),c.jsx("button",{id:"confirm-yes-btn",onClick:()=>au("yes"),style:{padding:"8px 24px",borderRadius:"8px",border:"none",background:"linear-gradient(135deg, #007acc, #0062a3)",color:"#fff",cursor:"pointer",fontSize:"13px",fontWeight:700,boxShadow:"0 4px 16px rgba(0,122,204,0.35)",transition:"all 0.15s"},onMouseEnter:y=>{y.target.style.background="linear-gradient(135deg, #0090f0, #007acc)"},onMouseLeave:y=>{y.target.style.background="linear-gradient(135deg, #007acc, #0062a3)"},children:"Sim"})]})]})}),I&&c.jsx("div",{className:"vscode-modal-overlay",children:c.jsxs("div",{className:"vscode-modal",style:{maxWidth:"440px",width:"90%"},children:[c.jsxs("div",{className:"vscode-sidebar-header",style:{padding:"10px 16px"},children:[c.jsxs("span",{className:"vscode-sidebar-title",style:{color:"#ffffff",display:"flex",alignItems:"center",gap:"8px"},children:[c.jsx(Hn,{size:14,style:{color:"#007acc"}}),"CONFIGURAÇÕES DA IDE"]}),c.jsx("button",{onClick:()=>b(!1),style:{background:"transparent",border:"none",cursor:"pointer",color:"#a0a0a0"},children:c.jsx(us,{size:14})})]}),c.jsxs("div",{style:{display:"flex",borderBottom:"1px solid var(--vscode-border)",backgroundColor:"var(--vscode-tab-inactive-bg)"},children:[c.jsx("button",{onClick:()=>K("preferences"),style:{flex:1,padding:"8px",background:T==="preferences"?"var(--vscode-tab-active-bg)":"transparent",border:"none",borderBottom:T==="preferences"?"2px solid var(--vscode-active-border)":"none",color:T==="preferences"?"#ffffff":"#808080",fontWeight:"bold",fontSize:"11px",textTransform:"uppercase",cursor:"pointer"},children:"Preferências"}),c.jsx("button",{onClick:()=>K("about"),style:{flex:1,padding:"8px",background:T==="about"?"var(--vscode-tab-active-bg)":"transparent",border:"none",borderBottom:T==="about"?"2px solid var(--vscode-active-border)":"none",color:T==="about"?"#ffffff":"#808080",fontWeight:"bold",fontSize:"11px",textTransform:"uppercase",cursor:"pointer"},children:"Sobre"})]}),c.jsx("div",{className:"flex flex-col",style:{padding:"16px",gap:"14px"},children:T==="preferences"?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex flex-col",style:{gap:"6px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Tema de Cor"}),c.jsxs("select",{value:C,onChange:y=>j(y.target.value),style:{width:"100%"},children:[c.jsx("option",{value:"dark",children:"Escuro (Dark Mode)"}),c.jsx("option",{value:"light",children:"Claro (Light Mode)"})]})]}),c.jsxs("div",{className:"flex flex-col",style:{gap:"6px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Tamanho da Fonte do Editor"}),c.jsx("input",{type:"number",min:"10",max:"30",value:U,onChange:y=>{const R=Number(y.target.value);H(R),Qn("editorFontSize",R)},style:{width:"100%"}})]}),c.jsxs("div",{className:"flex flex-col",style:{gap:"6px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Tamanho do Tab (Espaços)"}),c.jsxs("select",{value:V,onChange:y=>{const R=Number(y.target.value);te(R),Qn("editorTabSize",R)},style:{width:"100%"},children:[c.jsx("option",{value:2,children:"2 Espaços"}),c.jsx("option",{value:4,children:"4 Espaços"}),c.jsx("option",{value:8,children:"8 Espaços"})]})]}),c.jsxs("div",{className:"flex flex-col",style:{gap:"6px"},children:[c.jsx("label",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Quebra Automática de Linha (Word Wrap)"}),c.jsxs("select",{value:re,onChange:y=>{pe(y.target.value),Qn("editorWordWrap",y.target.value)},style:{width:"100%"},children:[c.jsx("option",{value:"on",children:"Ativado (On)"}),c.jsx("option",{value:"off",children:"Desativado (Off)"})]})]})]}):c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"14px",color:"#cccccc"},children:[c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[c.jsx("span",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Versão"}),c.jsx("span",{style:{fontSize:"13px",fontWeight:"bold",color:"#ffffff"},children:"0.1.6 alfa"})]}),c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[c.jsx("span",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Autor"}),c.jsx("span",{style:{fontSize:"13px",color:"#ffffff"},children:"dev@opala.com"})]}),c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[c.jsx("span",{className:"vscode-sidebar-section-title",style:{padding:0},children:"Licença"}),c.jsx("span",{style:{fontSize:"13px",color:"#ffffff"},children:"MIT"})]})]})}),c.jsx("div",{style:{display:"flex",justifyContent:"flex-end",padding:"12px 16px",gap:"8px",borderTop:"1px solid var(--vscode-border)",backgroundColor:"var(--vscode-sidebar-bg)"},children:c.jsx("button",{onClick:()=>b(!1),className:"vscode-button",children:"Fechar"})})]})})]})}function Im({node:e,selectedFile:t,handleFileSelect:i}){const r=e.isDirectory,[s,n]=D.useState(!1);if(r)return c.jsxs("div",{className:"select-none",children:[c.jsxs("div",{onClick:()=>n(!s),className:"vscode-tree-node",children:[s?c.jsx(Wy,{size:14}):c.jsx(Hy,{size:14}),c.jsx(Vy,{size:14,className:"text-white",style:{color:"#e8a838"}}),c.jsx("span",{className:"truncate",children:e.name})]}),s&&c.jsx("div",{style:{paddingLeft:"12px",borderLeft:"1px solid #3c3c3c",marginLeft:"14px"},children:e.children.map(l=>c.jsx(Im,{node:l,selectedFile:t,handleFileSelect:i},l.path))})]});const o=t===e.path;return c.jsxs("div",{onClick:()=>i(e.path),className:`vscode-tree-node ${o?"active":""}`,children:[c.jsx(Ky,{size:13,style:{color:"#a0a0a0"}}),c.jsx("span",{className:"truncate",children:e.name})]})}function uC(e){return e?e.split(`
|
|
206
206
|
`).map((i,r)=>{const s=i.trim();if(s.startsWith("### ")){const n=s.replace("### ","");return c.jsx("h4",{style:{margin:"14px 0 6px 0",fontWeight:"bold",color:"#ffffff",fontSize:"13px"},children:n},r)}if(s.startsWith("🔹 ")||s.startsWith("⭐ ")){const n=s.substring(0,2),l=s.substring(2).split("—");if(l.length>=2){const h=l[0].replace(/\*\*`|`\*\*/g,"").trim(),a=l.slice(1).join("—").trim();return c.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:"6px",margin:"4px 0",paddingLeft:"4px"},children:[c.jsx("span",{style:{fontSize:"12px",flexShrink:0},children:n}),c.jsxs("span",{style:{fontSize:"13px",lineHeight:"1.4"},children:[c.jsx("code",{style:{background:"#2d2d2d",padding:"2px 4px",borderRadius:"3px",color:"#f8f8f2",fontFamily:"monospace",fontSize:"11px",marginRight:"6px"},children:h}),c.jsx("span",{style:{color:"#cccccc"},children:a})]})]},r)}}if(s.startsWith("_(")&&s.endsWith(")_")){const n=s.substring(2,s.length-2);return c.jsx("p",{style:{margin:"8px 0",fontStyle:"italic",color:"#8a8a8a",fontSize:"11px"},children:n},r)}return c.jsx("div",{style:{minHeight:"1.2em",color:"#cccccc",fontSize:"13px",margin:"2px 0"},children:i},r)}):null}ha.createRoot(document.getElementById("root")).render(c.jsx(or.StrictMode,{children:c.jsx(cC,{})}));
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
10
10
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
11
11
|
<link href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
|
|
12
|
-
<script type="module" crossorigin src="/assets/index-
|
|
13
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
12
|
+
<script type="module" crossorigin src="/assets/index-nW4YtdWC.js"></script>
|
|
13
|
+
<link rel="stylesheet" crossorigin href="/assets/index-JnX7gh-E.css">
|
|
14
14
|
</head>
|
|
15
15
|
<body>
|
|
16
16
|
<div id="root"></div>
|
|
@@ -631,10 +631,10 @@ def start_gui_server(host="127.0.0.1", port=3000):
|
|
|
631
631
|
# webview.start() blocks the main thread until the window is closed.
|
|
632
632
|
webview.start(debug=False)
|
|
633
633
|
|
|
634
|
-
except ImportError:
|
|
634
|
+
except (ImportError, Exception) as e:
|
|
635
635
|
# Graceful fallback: open in the default web browser
|
|
636
636
|
import webbrowser
|
|
637
|
-
print(f"[OpalaCoder] pywebview
|
|
637
|
+
print(f"[OpalaCoder] pywebview failed to launch ({type(e).__name__}: {e}) — opening browser at {url}")
|
|
638
638
|
webbrowser.open(url)
|
|
639
639
|
# Keep the server alive
|
|
640
640
|
try:
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "opalacoder"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.6"
|
|
8
8
|
description = "Autonomous coding agent with interactive planning and modular execution"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
|
@@ -27,11 +27,14 @@ dependencies = [
|
|
|
27
27
|
"litellm>=1.40.0",
|
|
28
28
|
"tree-sitter>=0.25.0",
|
|
29
29
|
"tree-sitter-language-pack>=1.8.0",
|
|
30
|
-
"sentence-transformers>=3.0.0",
|
|
31
30
|
"chromadb>=0.4.0",
|
|
32
31
|
"pywebview>=4.0",
|
|
32
|
+
"PyQt6>=6.0.0",
|
|
33
33
|
]
|
|
34
34
|
|
|
35
|
+
[project.optional-dependencies]
|
|
36
|
+
embeddings = ["sentence-transformers>=3.0.0"]
|
|
37
|
+
|
|
35
38
|
[project.urls]
|
|
36
39
|
"Homepage" = "https://github.com/gilzamir/OpalaCoder"
|
|
37
40
|
"Bug Tracker" = "https://github.com/gilzamir/OpalaCoder/issues"
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2014 The xterm.js authors. All rights reserved.
|
|
3
|
-
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
|
4
|
-
* https://github.com/chjj/term.js
|
|
5
|
-
* @license MIT
|
|
6
|
-
*
|
|
7
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
-
* in the Software without restriction, including without limitation the rights
|
|
10
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
-
* furnished to do so, subject to the following conditions:
|
|
13
|
-
*
|
|
14
|
-
* The above copyright notice and this permission notice shall be included in
|
|
15
|
-
* all copies or substantial portions of the Software.
|
|
16
|
-
*
|
|
17
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
|
-
* THE SOFTWARE.
|
|
24
|
-
*
|
|
25
|
-
* Originally forked from (with the author's permission):
|
|
26
|
-
* Fabrice Bellard's javascript vt100 for jslinux:
|
|
27
|
-
* http://bellard.org/jslinux/
|
|
28
|
-
* Copyright (c) 2011 Fabrice Bellard
|
|
29
|
-
* The original design remains. The terminal itself
|
|
30
|
-
* has been extended to include xterm CSI codes, among
|
|
31
|
-
* other features.
|
|
32
|
-
*/.xterm{cursor:text;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:transparent;pointer-events:none}.xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}.xterm .xterm-accessibility-tree{font-family:monospace;-webkit-user-select:text;user-select:text;white-space:pre}.xterm .xterm-accessibility-tree>div{transform-origin:left;width:fit-content}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{text-decoration:double underline}.xterm-underline-3{text-decoration:wavy underline}.xterm-underline-4{text-decoration:dotted underline}.xterm-underline-5{text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{text-decoration:overline double underline}.xterm-overline.xterm-underline-3{text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}.xterm .xterm-scrollable-element>.scrollbar{cursor:default}.xterm .xterm-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.xterm .xterm-scrollable-element>.visible{opacity:1;background:#0000;transition:opacity .1s linear;z-index:11}.xterm .xterm-scrollable-element>.invisible{opacity:0;pointer-events:none}.xterm .xterm-scrollable-element>.invisible.fade{transition:opacity .8s linear}.xterm .xterm-scrollable-element>.shadow{position:absolute;display:none}.xterm .xterm-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:var(--vscode-scrollbar-shadow, #000) 0 6px 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.xterm .xterm-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}:root{--vscode-bg: #1e1e1e;--vscode-sidebar-bg: #252526;--vscode-activitybar-bg: #333333;--vscode-editor-bg: #1e1e1e;--vscode-panel-bg: #1e1e1e;--vscode-statusbar-bg: #007acc;--vscode-statusbar-fg: #ffffff;--vscode-text-fg: #cccccc;--vscode-text-light: #ffffff;--vscode-border: #3c3c3c;--vscode-active-item: #37373d;--vscode-hover-item: #2a2d2e;--vscode-active-border: #007acc;--vscode-input-bg: #2d2d2d;--vscode-button-bg: #0e639c;--vscode-button-hover: #1177bb;--vscode-tab-active-bg: #1e1e1e;--vscode-tab-inactive-bg: #2d2d2d;--vscode-terminal-bg: #1e1e1e}.light-theme{--vscode-bg: #f3f3f3;--vscode-sidebar-bg: #e1e1e1;--vscode-activitybar-bg: #2c2c2c;--vscode-editor-bg: #ffffff;--vscode-panel-bg: #f3f3f3;--vscode-statusbar-bg: #007acc;--vscode-statusbar-fg: #ffffff;--vscode-text-fg: #333333;--vscode-text-light: #000000;--vscode-border: #cccccc;--vscode-active-item: #d0d0d0;--vscode-hover-item: #e4e4e4;--vscode-active-border: #007acc;--vscode-input-bg: #ffffff;--vscode-button-bg: #007acc;--vscode-button-hover: #005a9e;--vscode-tab-active-bg: #f3f3f3;--vscode-tab-inactive-bg: #e1e1e1;--vscode-terminal-bg: #ffffff}*{box-sizing:border-box;margin:0;padding:0}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;background-color:var(--vscode-bg);color:var(--vscode-text-fg);overflow:hidden;height:100vh;font-size:13px}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:#79797966}::-webkit-scrollbar-thumb:hover{background:#646464b3}code,pre{font-family:Fira Code,Courier New,Courier,monospace}input,select,textarea{background-color:var(--vscode-input-bg);border:1px solid var(--vscode-border);color:#ccc;font-family:inherit;font-size:13px;padding:6px 8px;outline:none}input:focus,select:focus,textarea:focus{border-color:var(--vscode-active-border)}.vscode-button{background-color:var(--vscode-button-bg);color:#fff;border:none;padding:6px 12px;font-size:12px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:6px}.vscode-button:hover:not(:disabled){background-color:var(--vscode-button-hover)}.vscode-button:disabled{opacity:.5;cursor:not-allowed}.vscode-app{display:flex;flex-direction:column;height:100vh;overflow:hidden}.vscode-main{display:flex;flex:1;overflow:hidden}.vscode-activitybar{width:48px;background-color:var(--vscode-activitybar-bg);border-right:1px solid var(--vscode-border);display:flex;flex-direction:column;justify-content:space-between;align-items:center;padding:12px 0;flex-shrink:0}.vscode-activitybar-top{display:flex;flex-direction:column;gap:16px;align-items:center;width:100%}.vscode-activitybar-btn{background:transparent;border:none;color:#858585;padding:8px;cursor:pointer;width:100%;display:flex;justify-content:center;align-items:center;border-left:2px solid transparent;outline:none}.vscode-activitybar-btn.active{color:#fff;border-left-color:var(--vscode-active-border)}.vscode-activitybar-btn:hover{color:#fff}.vscode-sidebar{width:260px;background-color:var(--vscode-sidebar-bg);border-right:1px solid var(--vscode-border);display:flex;flex-direction:column;flex-shrink:0;overflow:hidden}.vscode-sidebar-header{padding:8px 12px;border-bottom:1px solid var(--vscode-border);display:flex;align-items:center;justify-content:space-between}.vscode-sidebar-title{font-size:11px;font-weight:700;text-transform:uppercase;color:#969696;letter-spacing:.5px}.vscode-sidebar-section{border-bottom:1px solid var(--vscode-border);padding:8px}.vscode-sidebar-section-title{font-size:10px;font-weight:700;color:gray;text-transform:uppercase;padding:2px 4px;margin-bottom:4px}.vscode-sidebar-content{flex:1;overflow-y:auto;padding:4px}.vscode-project-item{display:flex;align-items:center;justify-content:space-between;padding:6px 10px;cursor:pointer;color:#b0b0b0;border-radius:2px}.vscode-project-item:hover{background-color:var(--vscode-hover-item);color:#fff}.vscode-project-item.active{background-color:var(--vscode-active-item);color:#fff}.vscode-tree-node{display:flex;align-items:center;gap:6px;padding:4px 8px;cursor:pointer;color:#ccc;font-size:13px}.vscode-tree-node:hover{background-color:var(--vscode-hover-item)}.vscode-tree-node.active{background-color:var(--vscode-active-item);color:#fff;border-left:2px solid var(--vscode-active-border)}.vscode-editor-panel{flex:1;display:flex;flex-direction:column;background-color:var(--vscode-bg);overflow:hidden}.vscode-tabs{height:35px;background-color:var(--vscode-tab-inactive-bg);border-bottom:1px solid #252526;display:flex;align-items:center;justify-content:space-between;padding-right:16px;flex-shrink:0}.vscode-tab{height:100%;background-color:var(--vscode-tab-active-bg);border-top:2px solid var(--vscode-active-border);padding:0 16px;display:flex;align-items:center;gap:8px;border-right:1px solid #252526}.vscode-tab-close-btn{background:transparent;border:none;color:#858585;cursor:pointer;display:flex;align-items:center;padding:2px}.vscode-tab-close-btn:hover{background-color:#3c3c3c;color:#fff;border-radius:50%}.vscode-editor-container{flex:1;position:relative;background-color:var(--vscode-bg)}.vscode-bottom-panel{border-top:1px solid var(--vscode-border);background-color:var(--vscode-bg);display:flex;flex-direction:column;flex-shrink:0}.vscode-bottom-tabs{height:30px;background-color:var(--vscode-sidebar-bg);border-bottom:1px solid var(--vscode-border);display:flex;align-items:center;justify-content:space-between;padding:0 16px}.vscode-bottom-tab-list{display:flex;gap:16px;height:100%}.vscode-bottom-tab{font-size:11px;font-weight:700;text-transform:uppercase;color:gray;display:flex;align-items:center;cursor:pointer;height:100%}.vscode-bottom-tab.active{color:#fff;border-bottom:2px solid var(--vscode-active-border)}.vscode-logs{flex:1;padding:12px;overflow-y:auto;font-family:Fira Code,monospace;font-size:12px;line-height:1.5;background-color:var(--vscode-terminal-bg)}.vscode-chat{width:320px;background-color:var(--vscode-sidebar-bg);border-left:1px solid var(--vscode-border);display:flex;flex-direction:column;flex-shrink:0;overflow:hidden}.vscode-chat-header{padding:8px 12px;border-bottom:1px solid var(--vscode-border);display:flex;align-items:center;justify-content:space-between}.vscode-chat-toolbar{display:flex;border-bottom:1px solid var(--vscode-border);background-color:var(--vscode-bg)}.vscode-chat-tool-btn{flex:1;background:transparent;border:none;border-right:1px solid var(--vscode-border);color:#a0a0a0;font-size:10px;font-weight:700;padding:6px 0;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:4px}.vscode-chat-tool-btn:hover{background-color:var(--vscode-hover-item);color:#fff}.vscode-chat-history{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:16px;background-color:var(--vscode-sidebar-bg)}.vscode-chat-msg-header{font-size:10px;font-weight:700;text-transform:uppercase;margin-bottom:4px}.vscode-chat-msg-content{font-size:13px;line-height:1.6;color:#ccc;padding-left:8px;border-left:1px solid var(--vscode-border);white-space:pre-wrap}.vscode-chat-form{padding:12px;border-top:1px solid var(--vscode-border);background-color:var(--vscode-bg)}.vscode-chat-input-row{display:flex;gap:6px;align-items:center}.vscode-statusbar{height:22px;background-color:var(--vscode-statusbar-bg);color:var(--vscode-statusbar-fg);font-size:11px;display:flex;justify-content:space-between;align-items:center;padding:0 12px;flex-shrink:0}.vscode-modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:#0009;display:flex;align-items:center;justify-content:center;z-index:100}.vscode-modal{background-color:var(--vscode-sidebar-bg);border:1px solid var(--vscode-border);width:100%;max-w:400px;box-shadow:0 4px 20px #00000080;display:flex;flex-direction:column}.flex{display:flex}.flex-1{flex:1}.flex-col{flex-direction:column}.flex-shrink-0{flex-shrink:0}.items-center{align-items:center}.justify-between{justify-content:space-between}.relative{position:relative}.h-full{height:100%}.w-full{width:100%}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.text-white{color:#fff}.truncate{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.vscode-resizer-horizontal{width:4px;background-color:#252526;cursor:col-resize;flex-shrink:0;transition:background-color .2s ease;z-index:10;border-left:1px solid var(--vscode-border);border-right:1px solid var(--vscode-border)}.vscode-resizer-horizontal:hover,.vscode-resizer-horizontal:active{background-color:var(--vscode-active-border);border-left-color:var(--vscode-active-border);border-right-color:var(--vscode-active-border)}.vscode-resizer-vertical{height:4px;background-color:#252526;cursor:row-resize;flex-shrink:0;transition:background-color .2s ease;z-index:10;border-top:1px solid var(--vscode-border);border-bottom:1px solid var(--vscode-border)}.vscode-resizer-vertical:hover,.vscode-resizer-vertical:active{background-color:var(--vscode-active-border);border-top-color:var(--vscode-active-border);border-bottom-color:var(--vscode-active-border)}.vscode-context-menu{position:fixed;background-color:var(--vscode-sidebar-bg);border:1px solid var(--vscode-border);box-shadow:0 4px 12px #00000080;border-radius:4px;padding:4px 0;z-index:1000;min-width:150px}.vscode-context-menu-item{display:flex;align-items:center;gap:8px;padding:6px 12px;font-size:12px;color:#ccc;cursor:pointer;-webkit-user-select:none;user-select:none}.vscode-context-menu-item:hover{background-color:#007acc;color:#fff}.thinking-indicator{display:inline-flex;align-items:center;gap:4px;padding:4px 0}.thinking-indicator .dot{width:6px;height:6px;background-color:orchid;border-radius:50%;display:inline-block;animation:pulse 1.4s infinite ease-in-out both}.thinking-indicator .dot:nth-child(1){animation-delay:-.32s}.thinking-indicator .dot:nth-child(2){animation-delay:-.16s}@keyframes pulse{0%,80%,to{transform:scale(0);opacity:.3}40%{transform:scale(1);opacity:1}}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{opalacoder-0.1.4 → opalacoder-0.1.6}/skills/skills_store/html-css-js/scripts/check_contracts.py
RENAMED
|
File without changes
|
|
File without changes
|
{opalacoder-0.1.4 → opalacoder-0.1.6}/skills/skills_store/implement-feature/scripts/run_workflow.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|