opalacoder 0.1.5__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.5 → opalacoder-0.1.6}/PKG-INFO +3 -2
- {opalacoder-0.1.5 → opalacoder-0.1.6}/README.md +1 -1
- {opalacoder-0.1.5 → opalacoder-0.1.6}/gui_src/src/App.jsx +1 -1
- {opalacoder-0.1.5 → opalacoder-0.1.6}/opalacoder/__init__.py +1 -1
- opalacoder-0.1.5/opalacoder/gui/assets/index-CgWkjlng.js → opalacoder-0.1.6/opalacoder/gui/assets/index-nW4YtdWC.js +1 -1
- {opalacoder-0.1.5 → opalacoder-0.1.6}/opalacoder/gui/index.html +1 -1
- {opalacoder-0.1.5 → opalacoder-0.1.6}/pyproject.toml +2 -1
- {opalacoder-0.1.5 → opalacoder-0.1.6}/requirements.txt +1 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/.claude/rules/RULES.md +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/.claude/settings.json +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/.github/workflows/publish.yml +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/.gitignore +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/AGENTS.md +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/CLAUDE.md +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/GEMINI.md +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/agents.yaml +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/config.yaml +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/debug/scratch_tail.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/docs/guide/analysis_results.md +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/docs/guide/figs/logotipo.png +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/docs/guide/paper_memplan.md +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/docs/guide/skills-plugin-system.md +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/docs/specs/01-arquitetura.md +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/docs/specs/02-memgpt-orquestrador.md +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/docs/specs/03-skill-implement-feature.md +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/docs/specs/04-memoria.md +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/docs/specs/05-vcs-sombra.md +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/docs/specs/06-skills-e-plugins.md +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/docs/specs/07-configuracao.md +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/docs/specs/08-ide.md +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/docs/specs/09-ide-projectcreationinterface.md +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/docs/specs/README.md +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/gui_src/index.html +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/gui_src/package-lock.json +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/gui_src/package.json +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/gui_src/src/index.css +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/gui_src/src/main.jsx +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/gui_src/vite.config.js +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/main.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/opalacoder/agent_stdin.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/opalacoder/agents.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/opalacoder/api_keys.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/opalacoder/archival.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/opalacoder/cli.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/opalacoder/cli_commands.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/opalacoder/code_index.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/opalacoder/config.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/opalacoder/copy_gui.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/opalacoder/embeddings.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/opalacoder/gui/assets/index-JnX7gh-E.css +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/opalacoder/i18n.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/opalacoder/ide_server.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/opalacoder/memgpt_runtime.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/opalacoder/orchestrator.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/opalacoder/planner.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/opalacoder/plugins/__init__.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/opalacoder/plugins/html_css_js_tools.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/opalacoder/project.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/opalacoder/session.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/opalacoder/skills.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/opalacoder/structured.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/opalacoder/terminal.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/opalacoder/terminal_manager.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/opalacoder/tools.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/opalacoder/vcs.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/opalacoder/vector_index.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/opalacoder/workflow_orchestrator.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/opalacoder/workflow_tools.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/pytest.ini +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/skills/chat-orchestrator/SKILL.md +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/skills/command-line/SKILL.md +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/skills/command-line/scripts/command_executor.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/skills/skills_store/html-css-js/SKILL.md +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/skills/skills_store/html-css-js/scripts/check_contracts.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/skills/skills_store/implement-feature/SKILL.md +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/skills/skills_store/implement-feature/scripts/run_workflow.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/tests/test_agent_config.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/tests/test_agent_stdin.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/tests/test_code_index_integration.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/tests/test_command_line_skill.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/tests/test_complexity_evaluator.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/tests/test_context_guard.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/tests/test_file_delete.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/tests/test_i18n_coverage.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/tests/test_implement_feature_script.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/tests/test_memgpt_runtime.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/tests/test_model_commands.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/tests/test_planner_oracle_live.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/tests/test_planner_output.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/tests/test_project_store.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/tests/test_refinement_loop.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/tests/test_search_bugs.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/tests/test_skills_directory_loader.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/tests/test_unhashable_dict_bug.py +0 -0
- {opalacoder-0.1.5 → opalacoder-0.1.6}/tests/test_verification_strategies.py +0 -0
- {opalacoder-0.1.5 → 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,6 +15,7 @@ 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
|
|
@@ -57,7 +58,7 @@ OpalaCoder features an integrated desktop GUI built using React, Vite, and `pywe
|
|
|
57
58
|
- **Integrated Terminal**: Includes a real-time xterm.js terminal with shell/PTY integration for running and inspecting commands natively.
|
|
58
59
|
- **Git Source Control Sidebar**: A dedicated panel that tracks file modifications (color-coded as Modified/Untracked/Deleted) and provides a commit interface.
|
|
59
60
|
- **Global Settings Panel**: Customize the editor font size, tab size, and word wrapping, with dynamic toggle support for Light and Dark themes.
|
|
60
|
-
- **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.
|
|
61
62
|
|
|
62
63
|
### 6. Persistent Projects and CLI Commands
|
|
63
64
|
|
|
@@ -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
|
|
|
@@ -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"
|
|
@@ -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.5 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,7 +9,7 @@
|
|
|
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-
|
|
12
|
+
<script type="module" crossorigin src="/assets/index-nW4YtdWC.js"></script>
|
|
13
13
|
<link rel="stylesheet" crossorigin href="/assets/index-JnX7gh-E.css">
|
|
14
14
|
</head>
|
|
15
15
|
<body>
|
|
@@ -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"
|
|
@@ -29,6 +29,7 @@ dependencies = [
|
|
|
29
29
|
"tree-sitter-language-pack>=1.8.0",
|
|
30
30
|
"chromadb>=0.4.0",
|
|
31
31
|
"pywebview>=4.0",
|
|
32
|
+
"PyQt6>=6.0.0",
|
|
32
33
|
]
|
|
33
34
|
|
|
34
35
|
[project.optional-dependencies]
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{opalacoder-0.1.5 → opalacoder-0.1.6}/skills/skills_store/html-css-js/scripts/check_contracts.py
RENAMED
|
File without changes
|
|
File without changes
|
{opalacoder-0.1.5 → 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
|