comisai 1.0.16 → 1.0.17
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.
- package/node_modules/@comis/agent/package.json +1 -1
- package/node_modules/@comis/channels/package.json +1 -1
- package/node_modules/@comis/cli/dist/wizard/non-interactive.js +1 -0
- package/node_modules/@comis/cli/dist/wizard/steps/01-detect-existing.js +4 -0
- package/node_modules/@comis/cli/dist/wizard/steps/07-gateway.js +9 -0
- package/node_modules/@comis/cli/dist/wizard/steps/10-write-config.js +2 -0
- package/node_modules/@comis/cli/dist/wizard/steps/12-finish.js +5 -2
- package/node_modules/@comis/cli/dist/wizard/types.d.ts +1 -0
- package/node_modules/@comis/cli/package.json +1 -1
- package/node_modules/@comis/core/dist/config/schema-gateway.d.ts +17 -2
- package/node_modules/@comis/core/dist/config/schema-gateway.js +11 -0
- package/node_modules/@comis/core/dist/config/schema.d.ts +60 -57
- package/node_modules/@comis/core/package.json +1 -1
- package/node_modules/@comis/daemon/dist/wiring/setup-gateway.js +34 -6
- package/node_modules/@comis/daemon/package.json +1 -1
- package/node_modules/@comis/gateway/package.json +1 -1
- package/node_modules/@comis/infra/package.json +1 -1
- package/node_modules/@comis/memory/package.json +1 -1
- package/node_modules/@comis/scheduler/package.json +1 -1
- package/node_modules/@comis/shared/package.json +1 -1
- package/node_modules/@comis/skills/package.json +1 -1
- package/node_modules/@comis/web/dist/android-chrome-192x192.png +0 -0
- package/node_modules/@comis/web/dist/android-chrome-512x512.png +0 -0
- package/node_modules/@comis/web/dist/apple-touch-icon.png +0 -0
- package/node_modules/@comis/web/dist/assets/agent-detail-BG9MGWWj.js +615 -0
- package/node_modules/@comis/web/dist/assets/agent-editor-C26Q_xCs.js +2173 -0
- package/node_modules/@comis/web/dist/assets/agent-list-LHCJ4rw2.js +504 -0
- package/node_modules/@comis/web/dist/assets/approvals-q9VH_IKr.js +54 -0
- package/node_modules/@comis/web/dist/assets/billing-view-CtYvBqTE.js +375 -0
- package/node_modules/@comis/web/dist/assets/channel-detail-CaInesJM.js +681 -0
- package/node_modules/@comis/web/dist/assets/channel-list-B8dj3O9a.js +323 -0
- package/node_modules/@comis/web/dist/assets/chat-console-CNmzl0JW.js +943 -0
- package/node_modules/@comis/web/dist/assets/config-editor-DX4ITw6y.js +1374 -0
- package/node_modules/@comis/web/dist/assets/context-dag-browser-BwiaF5tf.js +393 -0
- package/node_modules/@comis/web/dist/assets/context-engine-BZ5Am6hA.js +393 -0
- package/node_modules/@comis/web/dist/assets/delivery-view-OfBZof-m.js +392 -0
- package/node_modules/@comis/web/dist/assets/diagnostics-view-YFwCxgr2.js +231 -0
- package/node_modules/@comis/web/dist/assets/directive-DoeGSK_T.js +1 -0
- package/node_modules/@comis/web/dist/assets/extract-variables-BM5qyK-s.js +149 -0
- package/node_modules/@comis/web/dist/assets/ic-array-editor-B7m6x7-S.js +118 -0
- package/node_modules/@comis/web/dist/assets/ic-breadcrumb-CUMpp3BL.js +75 -0
- package/node_modules/@comis/web/dist/assets/ic-budget-segment-bar-BtJ6x5mN.js +64 -0
- package/node_modules/@comis/web/dist/assets/ic-chat-message-CFyDJd0z.js +352 -0
- package/node_modules/@comis/web/dist/assets/ic-confirm-dialog-CCDbB04e.js +110 -0
- package/node_modules/@comis/web/dist/assets/ic-connection-dot-CnT1b8xr.js +54 -0
- package/node_modules/@comis/web/dist/assets/ic-data-table-CKUNTxHw.js +277 -0
- package/node_modules/@comis/web/dist/assets/ic-delivery-row-GP5Fkygs.js +67 -0
- package/node_modules/@comis/web/dist/assets/ic-detail-panel-BF83r-if.js +116 -0
- package/node_modules/@comis/web/dist/assets/ic-empty-state-60l2ePhd.js +52 -0
- package/node_modules/@comis/web/dist/assets/ic-graph-canvas-C8FuSMe1.js +359 -0
- package/node_modules/@comis/web/dist/assets/ic-icon-xeGTVhVG.js +33 -0
- package/node_modules/@comis/web/dist/assets/ic-layer-waterfall-COvEYMg5.js +69 -0
- package/node_modules/@comis/web/dist/assets/ic-relative-time-3FqpjeAI.js +12 -0
- package/node_modules/@comis/web/dist/assets/ic-search-input-CSOxY9g7.js +92 -0
- package/node_modules/@comis/web/dist/assets/ic-select-Ce-Raudx.js +127 -0
- package/node_modules/@comis/web/dist/assets/ic-tabs-B7QtM_v8.js +95 -0
- package/node_modules/@comis/web/dist/assets/ic-tag-CPPUnDLF.js +33 -0
- package/node_modules/@comis/web/dist/assets/ic-time-range-picker-CypCT68y.js +93 -0
- package/node_modules/@comis/web/dist/assets/ic-tool-call-7MaXSsCW.js +146 -0
- package/node_modules/@comis/web/dist/assets/index-CEcM1R_C.js +2830 -0
- package/node_modules/@comis/web/dist/assets/index-CIJFuItj.css +1 -0
- package/node_modules/@comis/web/dist/assets/mcp-management-BNZPnpDn.js +582 -0
- package/node_modules/@comis/web/dist/assets/media-config-BBvTYxOX.js +314 -0
- package/node_modules/@comis/web/dist/assets/media-test-BkK3RCRK.js +496 -0
- package/node_modules/@comis/web/dist/assets/memory-inspector-1hDGCGat.js +1139 -0
- package/node_modules/@comis/web/dist/assets/message-center-CXefwsUu.js +785 -0
- package/node_modules/@comis/web/dist/assets/models-C1qcU_j3.js +894 -0
- package/node_modules/@comis/web/dist/assets/observability-types-D7jUtSde.js +1 -0
- package/node_modules/@comis/web/dist/assets/observe-view-C0VBhX4C.js +814 -0
- package/node_modules/@comis/web/dist/assets/pipeline-builder-DcUUIrm0.js +1496 -0
- package/node_modules/@comis/web/dist/assets/pipeline-history-DkfOQ6SW.js +317 -0
- package/node_modules/@comis/web/dist/assets/pipeline-history-detail-hyHgD0ai.js +287 -0
- package/node_modules/@comis/web/dist/assets/pipeline-list-BPW8hV-q.js +518 -0
- package/node_modules/@comis/web/dist/assets/pipeline-monitor-Bip16T7e.js +972 -0
- package/node_modules/@comis/web/dist/assets/scheduler-BGgwKd06.js +1182 -0
- package/node_modules/@comis/web/dist/assets/security-D15st4xx.js +1224 -0
- package/node_modules/@comis/web/dist/assets/session-detail-SGEYNJ0M.js +632 -0
- package/node_modules/@comis/web/dist/assets/session-key-parser-DPORMVyU.js +1 -0
- package/node_modules/@comis/web/dist/assets/session-list-6ybUTxbY.js +231 -0
- package/node_modules/@comis/web/dist/assets/setup-wizard-nT0tz9QP.js +853 -0
- package/node_modules/@comis/web/dist/assets/skills-D8yVfSUy.js +1051 -0
- package/node_modules/@comis/web/dist/assets/subagents-HHXMeHYo.js +193 -0
- package/node_modules/@comis/web/dist/assets/workspace-manager-BQlr10iH.js +785 -0
- package/node_modules/@comis/web/dist/comis-logo.png +0 -0
- package/node_modules/@comis/web/dist/favicon-16x16.png +0 -0
- package/node_modules/@comis/web/dist/favicon-32x32.png +0 -0
- package/node_modules/@comis/web/dist/favicon.ico +0 -0
- package/node_modules/@comis/web/dist/index.html +17 -0
- package/node_modules/@comis/web/package.json +29 -0
- package/package.json +15 -13
|
@@ -0,0 +1,785 @@
|
|
|
1
|
+
import{a as g,I as o,b as t,A as d,s as u,f as v,i as b,n as h,r as s,t as _}from"./index-CEcM1R_C.js";import"./ic-breadcrumb-CUMpp3BL.js";import"./ic-tag-CPPUnDLF.js";import"./ic-confirm-dialog-CCDbB04e.js";import"./ic-empty-state-60l2ePhd.js";import"./ic-relative-time-3FqpjeAI.js";import"./ic-icon-xeGTVhVG.js";var x=Object.defineProperty,y=Object.getOwnPropertyDescriptor,a=(e,i,l,c)=>{for(var n=c>1?void 0:c?y(i,l):i,m=e.length-1,f;m>=0;m--)(f=e[m])&&(n=(c?f(i,l,n):f(n))||n);return c&&n&&x(i,l,n),n};const w=["projects","scripts","documents","media","data","output"];function p(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}let r=class extends g{constructor(){super(...arguments),this.rpcClient=null,this.agentId="",this._status=null,this._loadState="loading",this._error="",this._activeTab="files",this._selectedFile=null,this._selectedSubdir=null,this._fileContent="",this._editedContent="",this._dirEntries=[],this._saving=!1,this._dirty=!1,this._confirmAction=null,this._actionPending=!1,this._gitStatus=null,this._gitLog=[],this._gitDiff="",this._gitDiffFile=null,this._commitMessage="",this._committing=!1,this._restoreTarget=null}updated(e){(e.has("agentId")||e.has("rpcClient"))&&this.agentId&&this.rpcClient&&this._loadStatus()}async _loadStatus(){if(!(!this.rpcClient||!this.agentId)){this._loadState="loading",this._error="";try{this._status=await this.rpcClient.call("workspace.status",{agentId:this.agentId}),this._loadState="loaded"}catch(e){this._error=e instanceof Error?e.message:"Failed to load workspace status",this._loadState="error"}}}async _selectFile(e){if(this.rpcClient&&!(this._dirty&&!window.confirm("Discard unsaved changes?")))try{const i=await this.rpcClient.call("workspace.readFile",{agentId:this.agentId,filePath:e});this._selectedFile=e,this._fileContent=i.content,this._editedContent=i.content,this._dirty=!1,this._selectedSubdir=null,this._dirEntries=[]}catch(i){o.show(`Failed to read file: ${i instanceof Error?i.message:"Unknown error"}`,"error")}}async _selectSubdir(e){if(this.rpcClient&&!(this._dirty&&!window.confirm("Discard unsaved changes?")))try{const i=await this.rpcClient.call("workspace.listDir",{agentId:this.agentId,subdir:e});this._selectedSubdir=e,this._dirEntries=i.entries,this._selectedFile=null,this._fileContent="",this._editedContent="",this._dirty=!1}catch(i){o.show(`Failed to list directory: ${i instanceof Error?i.message:"Unknown error"}`,"error")}}_onEditorInput(e){const i=e.target;this._editedContent=i.value,this._dirty=this._editedContent!==this._fileContent}async _loadGitData(){if(!(!this.rpcClient||!this.agentId))try{const[e,i]=await Promise.all([this.rpcClient.call("workspace.git.status",{agentId:this.agentId}),this.rpcClient.call("workspace.git.log",{agentId:this.agentId,limit:20})]);this._gitStatus=e,this._gitLog=i.commits,this._gitDiff="",this._gitDiffFile=null}catch(e){o.show(`Failed to load git data: ${e instanceof Error?e.message:"Unknown error"}`,"error")}}async _loadFileDiff(e){if(!(!this.rpcClient||!this.agentId))try{const i=await this.rpcClient.call("workspace.git.diff",{agentId:this.agentId,filePath:e});this._gitDiff=i.diff,this._gitDiffFile=e}catch(i){o.show(`Failed to load diff: ${i instanceof Error?i.message:"Unknown error"}`,"error")}}async _handleSave(){if(!(!this.rpcClient||this._saving||!this._selectedFile)){this._saving=!0;try{await this.rpcClient.call("workspace.writeFile",{agentId:this.agentId,filePath:this._selectedFile,content:this._editedContent}),o.show("File saved","success"),this._fileContent=this._editedContent,this._dirty=!1}catch(e){o.show(`Failed to save: ${e instanceof Error?e.message:"Unknown error"}`,"error")}finally{this._saving=!1}}}async _handleReset(){if(!(!this.rpcClient||!this._selectedFile)){this._confirmAction=null,this._actionPending=!0;try{await this.rpcClient.call("workspace.resetFile",{agentId:this.agentId,fileName:this._selectedFile}),o.show("File reset to default","success"),await this._selectFile(this._selectedFile)}catch(e){o.show(`Failed to reset file: ${e instanceof Error?e.message:"Unknown error"}`,"error")}finally{this._actionPending=!1}}}async _handleDelete(){if(!(!this.rpcClient||!this._selectedFile)){this._confirmAction=null,this._actionPending=!0;try{await this.rpcClient.call("workspace.deleteFile",{agentId:this.agentId,filePath:this._selectedFile}),o.show("File deleted","success"),this._selectedFile=null,this._fileContent="",this._editedContent="",this._dirty=!1,await this._loadStatus()}catch(e){o.show(`Failed to delete file: ${e instanceof Error?e.message:"Unknown error"}`,"error")}finally{this._actionPending=!1}}}async _handleInit(){if(this.rpcClient){this._actionPending=!0;try{await this.rpcClient.call("workspace.init",{agentId:this.agentId}),o.show("Workspace initialized","success"),await this._loadStatus()}catch(e){o.show(`Failed to initialize workspace: ${e instanceof Error?e.message:"Unknown error"}`,"error")}finally{this._actionPending=!1}}}_switchToGitTab(){this._activeTab="git",this._confirmAction=null,this._restoreTarget=null,this._loadGitData()}_requestRestore(e){this._restoreTarget=e,this._confirmAction="restore"}async _handleRestore(){if(!(!this.rpcClient||!this._restoreTarget)){this._confirmAction=null,this._actionPending=!0;try{await this.rpcClient.call("workspace.git.restore",{agentId:this.agentId,filePath:this._restoreTarget}),o.show("File restored to HEAD","success"),this._restoreTarget=null,await this._loadGitData()}catch(e){o.show(`Failed to restore: ${e instanceof Error?e.message:"Unknown error"}`,"error")}finally{this._actionPending=!1}}}async _handleCommit(){if(!(!this.rpcClient||!this.agentId||this._committing)){this._committing=!0;try{await this.rpcClient.call("workspace.git.commit",{agentId:this.agentId,message:this._commitMessage||void 0}),o.show("Changes committed","success"),this._commitMessage="",await this._loadGitData()}catch(e){o.show(`Commit failed: ${e instanceof Error?e.message:"Unknown error"}`,"error")}finally{this._committing=!1}}}_statusBadge(e){switch(e){case"modified":return"M";case"added":return"A";case"deleted":return"D";case"untracked":return"??";case"renamed":return"R";case"copied":return"C";default:return"?"}}_diffLineClass(e){return e.startsWith("@@")?"diff-hunk":e.startsWith("+")?"diff-add":e.startsWith("-")?"diff-del":"diff-ctx"}get _commitDisabled(){return this._committing||this._gitStatus?.clean===!0}_navigate(e){this.dispatchEvent(new CustomEvent("navigate",{detail:e,bubbles:!0,composed:!0}))}render(){switch(this._loadState){case"loading":return t`<ic-skeleton-view variant="editor"></ic-skeleton-view>`;case"error":return t`
|
|
2
|
+
<div class="error-container">
|
|
3
|
+
<div class="error-message">${this._error}</div>
|
|
4
|
+
<button class="retry-btn" @click=${()=>this._loadStatus()}>Retry</button>
|
|
5
|
+
</div>
|
|
6
|
+
`;case"loaded":return this._status&&!this._status.exists?this._renderNotInitialized():this._renderWorkspace()}}_renderNotInitialized(){return t`
|
|
7
|
+
${this._renderBreadcrumb()}
|
|
8
|
+
<ic-empty-state
|
|
9
|
+
message="Workspace not initialized"
|
|
10
|
+
icon="folder"
|
|
11
|
+
description="Initialize the workspace to manage agent files and configuration."
|
|
12
|
+
>
|
|
13
|
+
<button
|
|
14
|
+
class="btn btn--primary"
|
|
15
|
+
?disabled=${this._actionPending}
|
|
16
|
+
@click=${()=>this._handleInit()}
|
|
17
|
+
>Init Workspace</button>
|
|
18
|
+
</ic-empty-state>
|
|
19
|
+
`}_renderWorkspace(){return t`
|
|
20
|
+
${this._renderBreadcrumb()}
|
|
21
|
+
${this._renderStatusBar()}
|
|
22
|
+
${this._renderTabBar()}
|
|
23
|
+
${this._activeTab==="files"?t`
|
|
24
|
+
<div class="workspace-layout">
|
|
25
|
+
<div class="file-tree">
|
|
26
|
+
${this._renderFileTree()}
|
|
27
|
+
</div>
|
|
28
|
+
<div class="editor-panel">
|
|
29
|
+
${this._renderEditorPanel()}
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
`:this._renderGitTab()}
|
|
33
|
+
`}_renderBreadcrumb(){return t`
|
|
34
|
+
<ic-breadcrumb
|
|
35
|
+
.items=${[{label:"Agents",route:"agents"},{label:this.agentId,route:`agents/${this.agentId}`},{label:"Workspace"}]}
|
|
36
|
+
@navigate=${e=>this._navigate(e.detail)}
|
|
37
|
+
></ic-breadcrumb>
|
|
38
|
+
`}_renderStatusBar(){return this._status?t`
|
|
39
|
+
<div class="status-bar">
|
|
40
|
+
<code>${this._status.dir}</code>
|
|
41
|
+
<ic-tag variant=${this._status.hasGitRepo?"success":"default"}>
|
|
42
|
+
${this._status.hasGitRepo?"git repo":"no git"}
|
|
43
|
+
</ic-tag>
|
|
44
|
+
<ic-tag variant=${this._status.isBootstrapped?"success":"warning"}>
|
|
45
|
+
${this._status.isBootstrapped?"bootstrapped":"onboarding"}
|
|
46
|
+
</ic-tag>
|
|
47
|
+
</div>
|
|
48
|
+
`:d}_renderTabBar(){return t`
|
|
49
|
+
<div class="tab-bar">
|
|
50
|
+
<button
|
|
51
|
+
class="tab-btn ${this._activeTab==="files"?"tab-btn--active":""}"
|
|
52
|
+
@click=${()=>{this._activeTab="files",this._confirmAction=null,this._restoreTarget=null}}
|
|
53
|
+
>Files</button>
|
|
54
|
+
<button
|
|
55
|
+
class="tab-btn ${this._activeTab==="git"?"tab-btn--active":""}"
|
|
56
|
+
@click=${()=>this._switchToGitTab()}
|
|
57
|
+
>Git</button>
|
|
58
|
+
</div>
|
|
59
|
+
`}_renderFileTree(){return this._status?t`
|
|
60
|
+
<div class="tree-section-label">Template Files</div>
|
|
61
|
+
${this._status.files.map(e=>t`
|
|
62
|
+
<button
|
|
63
|
+
class="tree-item ${this._selectedFile===e.name?"tree-item--active":""}"
|
|
64
|
+
@click=${()=>this._selectFile(e.name)}
|
|
65
|
+
>
|
|
66
|
+
<span class="presence-dot ${e.present?"presence-dot--present":"presence-dot--absent"}"></span>
|
|
67
|
+
<span class="file-name">${e.name}</span>
|
|
68
|
+
${e.present&&e.sizeBytes!==void 0?t`<span class="file-size">${p(e.sizeBytes)}</span>`:d}
|
|
69
|
+
</button>
|
|
70
|
+
`)}
|
|
71
|
+
<hr class="tree-separator" />
|
|
72
|
+
<div class="tree-section-label">Directories</div>
|
|
73
|
+
${w.map(e=>t`
|
|
74
|
+
<button
|
|
75
|
+
class="tree-item ${this._selectedSubdir===e?"tree-item--active":""}"
|
|
76
|
+
@click=${()=>this._selectSubdir(e)}
|
|
77
|
+
>
|
|
78
|
+
<span class="folder-icon">\uD83D\uDCC1</span>
|
|
79
|
+
<span class="file-name">${e}</span>
|
|
80
|
+
</button>
|
|
81
|
+
`)}
|
|
82
|
+
`:d}_renderEditorPanel(){return this._selectedFile?this._renderFileEditor():this._selectedSubdir?this._renderDirListing():t`
|
|
83
|
+
<div class="placeholder-panel">Select a file or directory from the sidebar</div>
|
|
84
|
+
`}_renderFileEditor(){return t`
|
|
85
|
+
<div class="editor-header">
|
|
86
|
+
<span class="editor-filename">${this._selectedFile}</span>
|
|
87
|
+
${this._dirty?t`<span class="dirty-indicator">unsaved</span>`:d}
|
|
88
|
+
</div>
|
|
89
|
+
<textarea
|
|
90
|
+
class="editor-textarea"
|
|
91
|
+
.value=${this._editedContent}
|
|
92
|
+
@input=${this._onEditorInput}
|
|
93
|
+
spellcheck="false"
|
|
94
|
+
></textarea>
|
|
95
|
+
<div class="action-bar">
|
|
96
|
+
<button
|
|
97
|
+
class="btn btn--primary"
|
|
98
|
+
?disabled=${!this._dirty||this._saving}
|
|
99
|
+
@click=${()=>this._handleSave()}
|
|
100
|
+
>${this._saving?"Saving...":"Save"}</button>
|
|
101
|
+
<button
|
|
102
|
+
class="btn btn--secondary"
|
|
103
|
+
?disabled=${this._actionPending}
|
|
104
|
+
@click=${()=>{this._confirmAction="reset"}}
|
|
105
|
+
>Reset to Default</button>
|
|
106
|
+
<button
|
|
107
|
+
class="btn btn--danger"
|
|
108
|
+
?disabled=${this._actionPending}
|
|
109
|
+
@click=${()=>{this._confirmAction="delete"}}
|
|
110
|
+
>Delete</button>
|
|
111
|
+
</div>
|
|
112
|
+
|
|
113
|
+
<ic-confirm-dialog
|
|
114
|
+
?open=${this._confirmAction==="reset"}
|
|
115
|
+
title="Reset to Default"
|
|
116
|
+
message=${`Reset "${this._selectedFile}" to its default content? Current content will be overwritten.`}
|
|
117
|
+
variant="default"
|
|
118
|
+
confirmLabel="Reset"
|
|
119
|
+
@confirm=${()=>this._handleReset()}
|
|
120
|
+
@cancel=${()=>{this._confirmAction=null}}
|
|
121
|
+
></ic-confirm-dialog>
|
|
122
|
+
|
|
123
|
+
<ic-confirm-dialog
|
|
124
|
+
?open=${this._confirmAction==="delete"}
|
|
125
|
+
title="Delete File"
|
|
126
|
+
message=${`Delete "${this._selectedFile}"? This action cannot be undone.`}
|
|
127
|
+
variant="danger"
|
|
128
|
+
confirmLabel="Delete"
|
|
129
|
+
@confirm=${()=>this._handleDelete()}
|
|
130
|
+
@cancel=${()=>{this._confirmAction=null}}
|
|
131
|
+
></ic-confirm-dialog>
|
|
132
|
+
`}_renderDirListing(){return this._dirEntries.length===0?t`<div class="dir-empty">Empty directory</div>`:t`
|
|
133
|
+
<table class="dir-table">
|
|
134
|
+
<thead>
|
|
135
|
+
<tr>
|
|
136
|
+
<th>Name</th>
|
|
137
|
+
<th>Type</th>
|
|
138
|
+
<th>Size</th>
|
|
139
|
+
<th>Modified</th>
|
|
140
|
+
</tr>
|
|
141
|
+
</thead>
|
|
142
|
+
<tbody>
|
|
143
|
+
${this._dirEntries.map(e=>t`
|
|
144
|
+
<tr>
|
|
145
|
+
<td>${e.name}</td>
|
|
146
|
+
<td>${e.type}</td>
|
|
147
|
+
<td>${e.sizeBytes!==void 0?p(e.sizeBytes):"-"}</td>
|
|
148
|
+
<td>
|
|
149
|
+
${e.modifiedAt?t`<ic-relative-time .timestamp=${e.modifiedAt}></ic-relative-time>`:"-"}
|
|
150
|
+
</td>
|
|
151
|
+
</tr>
|
|
152
|
+
`)}
|
|
153
|
+
</tbody>
|
|
154
|
+
</table>
|
|
155
|
+
`}_renderGitTab(){return this._status?.hasGitRepo?t`
|
|
156
|
+
<div class="git-panel">
|
|
157
|
+
${this._renderGitStatus()}
|
|
158
|
+
${this._renderDiffViewer()}
|
|
159
|
+
${this._renderCommitForm()}
|
|
160
|
+
${this._renderCommitLog()}
|
|
161
|
+
<ic-confirm-dialog
|
|
162
|
+
?open=${this._confirmAction==="restore"}
|
|
163
|
+
title="Restore File"
|
|
164
|
+
message=${`Restore "${this._restoreTarget}" to HEAD? Uncommitted changes will be lost.`}
|
|
165
|
+
variant="danger"
|
|
166
|
+
confirmLabel="Restore"
|
|
167
|
+
@confirm=${()=>this._handleRestore()}
|
|
168
|
+
@cancel=${()=>{this._confirmAction=null,this._restoreTarget=null}}
|
|
169
|
+
></ic-confirm-dialog>
|
|
170
|
+
</div>
|
|
171
|
+
`:t`
|
|
172
|
+
<ic-empty-state
|
|
173
|
+
message="No git repository"
|
|
174
|
+
description="Initialize a git repository to track workspace changes."
|
|
175
|
+
icon="folder"
|
|
176
|
+
></ic-empty-state>
|
|
177
|
+
`}_renderGitStatus(){return this._gitStatus?t`
|
|
178
|
+
<div class="git-section">
|
|
179
|
+
<div class="git-section-header">
|
|
180
|
+
<span>Status</span>
|
|
181
|
+
<span class="git-branch">${this._gitStatus.branch}</span>
|
|
182
|
+
<span class="git-change-count">${this._gitStatus.entries.length} changes</span>
|
|
183
|
+
</div>
|
|
184
|
+
${this._gitStatus.clean?t`<div class="clean-message">Working tree clean</div>`:this._gitStatus.entries.map(e=>{const i=this._statusBadge(e.status),l=i==="??"?"U":i;return t`
|
|
185
|
+
<div
|
|
186
|
+
class="changed-file ${this._gitDiffFile===e.path?"changed-file--active":""}"
|
|
187
|
+
@click=${()=>this._loadFileDiff(e.path)}
|
|
188
|
+
>
|
|
189
|
+
<span class="status-badge status-badge--${l}">${i}</span>
|
|
190
|
+
<span class="changed-file-path">${e.path}</span>
|
|
191
|
+
${e.status!=="untracked"&&e.status!=="added"?t`<button
|
|
192
|
+
class="restore-btn"
|
|
193
|
+
@click=${c=>{c.stopPropagation(),this._requestRestore(e.path)}}
|
|
194
|
+
>Restore</button>`:d}
|
|
195
|
+
</div>
|
|
196
|
+
`})}
|
|
197
|
+
</div>
|
|
198
|
+
`:d}_renderDiffViewer(){if(!this._gitDiff)return t`<div class="diff-empty">Select a changed file to view its diff</div>`;const e=this._gitDiff.split(`
|
|
199
|
+
`);return t`
|
|
200
|
+
<div class="diff-viewer">
|
|
201
|
+
<div class="diff-header">${this._gitDiffFile}</div>
|
|
202
|
+
<pre class="diff-content">${e.map(i=>t`<span class="${this._diffLineClass(i)}">${i}\n</span>`)}</pre>
|
|
203
|
+
</div>
|
|
204
|
+
`}_renderCommitForm(){return t`
|
|
205
|
+
<div class="git-section">
|
|
206
|
+
<div class="git-section-header">Commit</div>
|
|
207
|
+
<div class="commit-form">
|
|
208
|
+
<input
|
|
209
|
+
class="commit-input"
|
|
210
|
+
type="text"
|
|
211
|
+
placeholder="Commit message (optional)"
|
|
212
|
+
.value=${this._commitMessage}
|
|
213
|
+
@input=${e=>{this._commitMessage=e.target.value}}
|
|
214
|
+
/>
|
|
215
|
+
<button
|
|
216
|
+
class="btn btn--primary"
|
|
217
|
+
?disabled=${this._commitDisabled}
|
|
218
|
+
@click=${()=>this._handleCommit()}
|
|
219
|
+
>${this._committing?"Committing...":"Commit"}</button>
|
|
220
|
+
</div>
|
|
221
|
+
</div>
|
|
222
|
+
`}_renderCommitLog(){return t`
|
|
223
|
+
<div class="git-section">
|
|
224
|
+
<div class="git-section-header">Recent Commits</div>
|
|
225
|
+
${this._gitLog.length===0?t`<div class="clean-message">No commits yet</div>`:this._gitLog.map(e=>t`
|
|
226
|
+
<div class="commit-entry">
|
|
227
|
+
<span class="commit-sha">${e.sha.slice(0,7)}</span>
|
|
228
|
+
<span class="commit-message">${e.message}</span>
|
|
229
|
+
<span class="commit-time">
|
|
230
|
+
<ic-relative-time .timestamp=${new Date(e.date).getTime()}></ic-relative-time>
|
|
231
|
+
</span>
|
|
232
|
+
</div>
|
|
233
|
+
`)}
|
|
234
|
+
</div>
|
|
235
|
+
`}};r.styles=[u,v,b`
|
|
236
|
+
:host {
|
|
237
|
+
display: block;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/* --- Layout --- */
|
|
241
|
+
.workspace-layout {
|
|
242
|
+
display: grid;
|
|
243
|
+
grid-template-columns: 280px 1fr;
|
|
244
|
+
gap: var(--ic-space-md, 0.75rem);
|
|
245
|
+
min-height: 500px;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/* --- Status bar --- */
|
|
249
|
+
.status-bar {
|
|
250
|
+
display: flex;
|
|
251
|
+
align-items: center;
|
|
252
|
+
gap: var(--ic-space-sm, 0.5rem);
|
|
253
|
+
margin-bottom: var(--ic-space-md, 0.75rem);
|
|
254
|
+
flex-wrap: wrap;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.status-bar code {
|
|
258
|
+
font-family: var(--ic-font-mono, ui-monospace, monospace);
|
|
259
|
+
font-size: var(--ic-text-xs, 0.75rem);
|
|
260
|
+
color: var(--ic-text-muted, #9ca3af);
|
|
261
|
+
background: var(--ic-surface-2, #1f2937);
|
|
262
|
+
padding: 2px 6px;
|
|
263
|
+
border-radius: var(--ic-radius-sm, 0.25rem);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/* --- Tab bar --- */
|
|
267
|
+
.tab-bar {
|
|
268
|
+
display: flex;
|
|
269
|
+
gap: 0;
|
|
270
|
+
border-bottom: 1px solid var(--ic-border, #374151);
|
|
271
|
+
margin-bottom: var(--ic-space-md, 0.75rem);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.tab-btn {
|
|
275
|
+
padding: var(--ic-space-sm, 0.5rem) var(--ic-space-md, 0.75rem);
|
|
276
|
+
background: transparent;
|
|
277
|
+
border: none;
|
|
278
|
+
border-bottom: 2px solid transparent;
|
|
279
|
+
color: var(--ic-text-muted, #9ca3af);
|
|
280
|
+
font-size: var(--ic-text-sm, 0.875rem);
|
|
281
|
+
font-family: inherit;
|
|
282
|
+
cursor: pointer;
|
|
283
|
+
transition: color var(--ic-transition, 150ms ease),
|
|
284
|
+
border-color var(--ic-transition, 150ms ease);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.tab-btn:hover {
|
|
288
|
+
color: var(--ic-text, #f3f4f6);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.tab-btn--active {
|
|
292
|
+
color: var(--ic-accent, #3b82f6);
|
|
293
|
+
border-bottom-color: var(--ic-accent, #3b82f6);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/* --- File tree sidebar --- */
|
|
297
|
+
.file-tree {
|
|
298
|
+
border-right: 1px solid var(--ic-border, #374151);
|
|
299
|
+
padding-right: var(--ic-space-md, 0.75rem);
|
|
300
|
+
overflow-y: auto;
|
|
301
|
+
max-height: 600px;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.tree-section-label {
|
|
305
|
+
font-size: var(--ic-text-xs, 0.75rem);
|
|
306
|
+
font-weight: 600;
|
|
307
|
+
text-transform: uppercase;
|
|
308
|
+
letter-spacing: 0.05em;
|
|
309
|
+
color: var(--ic-text-dim, #858d9d);
|
|
310
|
+
margin: var(--ic-space-md, 0.75rem) 0 var(--ic-space-xs, 0.25rem) 0;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.tree-separator {
|
|
314
|
+
border: none;
|
|
315
|
+
border-top: 1px solid var(--ic-border, #374151);
|
|
316
|
+
margin: var(--ic-space-sm, 0.5rem) 0;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.tree-item {
|
|
320
|
+
display: flex;
|
|
321
|
+
align-items: center;
|
|
322
|
+
gap: var(--ic-space-sm, 0.5rem);
|
|
323
|
+
padding: var(--ic-space-xs, 0.25rem) var(--ic-space-sm, 0.5rem);
|
|
324
|
+
border-radius: var(--ic-radius-sm, 0.25rem);
|
|
325
|
+
background: transparent;
|
|
326
|
+
border: none;
|
|
327
|
+
color: var(--ic-text, #f3f4f6);
|
|
328
|
+
font-size: var(--ic-text-sm, 0.875rem);
|
|
329
|
+
font-family: inherit;
|
|
330
|
+
cursor: pointer;
|
|
331
|
+
width: 100%;
|
|
332
|
+
text-align: left;
|
|
333
|
+
transition: background var(--ic-transition, 150ms ease);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.tree-item:hover {
|
|
337
|
+
background: var(--ic-surface-2, #1f2937);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.tree-item--active {
|
|
341
|
+
background: color-mix(in srgb, var(--ic-accent, #3b82f6) 15%, transparent);
|
|
342
|
+
color: var(--ic-accent, #3b82f6);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.presence-dot {
|
|
346
|
+
display: inline-block;
|
|
347
|
+
width: 8px;
|
|
348
|
+
height: 8px;
|
|
349
|
+
border-radius: 50%;
|
|
350
|
+
flex-shrink: 0;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.presence-dot--present {
|
|
354
|
+
background: var(--ic-success, #34d399);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.presence-dot--absent {
|
|
358
|
+
background: var(--ic-error, #f87171);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.file-name {
|
|
362
|
+
flex: 1;
|
|
363
|
+
overflow: hidden;
|
|
364
|
+
text-overflow: ellipsis;
|
|
365
|
+
white-space: nowrap;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.file-size {
|
|
369
|
+
font-size: var(--ic-text-xs, 0.75rem);
|
|
370
|
+
color: var(--ic-text-dim, #858d9d);
|
|
371
|
+
flex-shrink: 0;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
.folder-icon {
|
|
375
|
+
flex-shrink: 0;
|
|
376
|
+
font-size: var(--ic-text-sm, 0.875rem);
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/* --- Editor panel --- */
|
|
380
|
+
.editor-panel {
|
|
381
|
+
display: flex;
|
|
382
|
+
flex-direction: column;
|
|
383
|
+
gap: var(--ic-space-sm, 0.5rem);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.editor-header {
|
|
387
|
+
display: flex;
|
|
388
|
+
align-items: center;
|
|
389
|
+
justify-content: space-between;
|
|
390
|
+
gap: var(--ic-space-sm, 0.5rem);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.editor-filename {
|
|
394
|
+
font-family: var(--ic-font-mono, ui-monospace, monospace);
|
|
395
|
+
font-size: var(--ic-text-sm, 0.875rem);
|
|
396
|
+
font-weight: 600;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.dirty-indicator {
|
|
400
|
+
font-size: var(--ic-text-xs, 0.75rem);
|
|
401
|
+
color: var(--ic-warning, #fbbf24);
|
|
402
|
+
font-style: italic;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
.editor-textarea {
|
|
406
|
+
width: 100%;
|
|
407
|
+
min-height: 400px;
|
|
408
|
+
font-family: var(--ic-font-mono, ui-monospace, monospace);
|
|
409
|
+
font-size: var(--ic-text-sm, 0.875rem);
|
|
410
|
+
line-height: 1.5;
|
|
411
|
+
background: var(--ic-surface-2, #1f2937);
|
|
412
|
+
color: var(--ic-text, #f3f4f6);
|
|
413
|
+
border: 1px solid var(--ic-border, #374151);
|
|
414
|
+
border-radius: var(--ic-radius-md, 0.5rem);
|
|
415
|
+
padding: var(--ic-space-md, 0.75rem);
|
|
416
|
+
resize: vertical;
|
|
417
|
+
tab-size: 2;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.editor-textarea:focus {
|
|
421
|
+
outline: 2px solid var(--ic-accent, #3b82f6);
|
|
422
|
+
outline-offset: -1px;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
/* --- Action buttons --- */
|
|
426
|
+
.action-bar {
|
|
427
|
+
display: flex;
|
|
428
|
+
gap: var(--ic-space-sm, 0.5rem);
|
|
429
|
+
margin-top: var(--ic-space-xs, 0.25rem);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
.btn {
|
|
433
|
+
display: inline-flex;
|
|
434
|
+
align-items: center;
|
|
435
|
+
gap: var(--ic-space-xs, 0.25rem);
|
|
436
|
+
padding: var(--ic-space-sm, 0.5rem) var(--ic-space-md, 0.75rem);
|
|
437
|
+
border: 1px solid var(--ic-border, #374151);
|
|
438
|
+
border-radius: var(--ic-radius-md, 0.5rem);
|
|
439
|
+
font-size: var(--ic-text-sm, 0.875rem);
|
|
440
|
+
font-weight: 500;
|
|
441
|
+
font-family: inherit;
|
|
442
|
+
cursor: pointer;
|
|
443
|
+
transition: background var(--ic-transition, 150ms ease),
|
|
444
|
+
border-color var(--ic-transition, 150ms ease),
|
|
445
|
+
color var(--ic-transition, 150ms ease);
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
.btn--primary {
|
|
449
|
+
background: var(--ic-accent, #3b82f6);
|
|
450
|
+
color: #fff;
|
|
451
|
+
border-color: var(--ic-accent, #3b82f6);
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
.btn--primary:hover {
|
|
455
|
+
background: var(--ic-accent-hover, #2563eb);
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
.btn--secondary {
|
|
459
|
+
background: transparent;
|
|
460
|
+
color: var(--ic-text, #f3f4f6);
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.btn--secondary:hover {
|
|
464
|
+
background: var(--ic-surface-2, #1f2937);
|
|
465
|
+
border-color: var(--ic-accent, #3b82f6);
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
.btn--danger {
|
|
469
|
+
background: transparent;
|
|
470
|
+
color: var(--ic-error, #f87171);
|
|
471
|
+
border-color: var(--ic-error, #f87171);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
.btn--danger:hover {
|
|
475
|
+
background: color-mix(in srgb, var(--ic-error, #f87171) 10%, transparent);
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
.btn:disabled {
|
|
479
|
+
opacity: 0.5;
|
|
480
|
+
cursor: not-allowed;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
/* --- Directory table --- */
|
|
484
|
+
.dir-table {
|
|
485
|
+
width: 100%;
|
|
486
|
+
border-collapse: collapse;
|
|
487
|
+
font-size: var(--ic-text-sm, 0.875rem);
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
.dir-table th {
|
|
491
|
+
text-align: left;
|
|
492
|
+
font-weight: 600;
|
|
493
|
+
font-size: var(--ic-text-xs, 0.75rem);
|
|
494
|
+
text-transform: uppercase;
|
|
495
|
+
letter-spacing: 0.05em;
|
|
496
|
+
color: var(--ic-text-dim, #858d9d);
|
|
497
|
+
padding: var(--ic-space-xs, 0.25rem) var(--ic-space-sm, 0.5rem);
|
|
498
|
+
border-bottom: 1px solid var(--ic-border, #374151);
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
.dir-table td {
|
|
502
|
+
padding: var(--ic-space-xs, 0.25rem) var(--ic-space-sm, 0.5rem);
|
|
503
|
+
border-bottom: 1px solid
|
|
504
|
+
color-mix(in srgb, var(--ic-border, #374151) 50%, transparent);
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
.dir-table tr:nth-child(even) td {
|
|
508
|
+
background: color-mix(in srgb, var(--ic-surface-2, #1f2937) 50%, transparent);
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
.dir-empty {
|
|
512
|
+
color: var(--ic-text-dim, #858d9d);
|
|
513
|
+
font-size: var(--ic-text-sm, 0.875rem);
|
|
514
|
+
font-style: italic;
|
|
515
|
+
padding: var(--ic-space-md, 0.75rem);
|
|
516
|
+
text-align: center;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
/* --- Placeholder panel --- */
|
|
520
|
+
.placeholder-panel {
|
|
521
|
+
display: flex;
|
|
522
|
+
align-items: center;
|
|
523
|
+
justify-content: center;
|
|
524
|
+
height: 100%;
|
|
525
|
+
min-height: 300px;
|
|
526
|
+
color: var(--ic-text-dim, #858d9d);
|
|
527
|
+
font-size: var(--ic-text-sm, 0.875rem);
|
|
528
|
+
font-style: italic;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
/* --- Git tab --- */
|
|
532
|
+
.git-panel {
|
|
533
|
+
display: flex;
|
|
534
|
+
flex-direction: column;
|
|
535
|
+
gap: var(--ic-space-md, 0.75rem);
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
.git-section {
|
|
539
|
+
border: 1px solid var(--ic-border, #374151);
|
|
540
|
+
border-radius: var(--ic-radius-md, 0.5rem);
|
|
541
|
+
overflow: hidden;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
.git-section-header {
|
|
545
|
+
display: flex;
|
|
546
|
+
align-items: center;
|
|
547
|
+
justify-content: space-between;
|
|
548
|
+
padding: var(--ic-space-sm, 0.5rem) var(--ic-space-md, 0.75rem);
|
|
549
|
+
background: var(--ic-surface-2, #1f2937);
|
|
550
|
+
font-size: var(--ic-text-sm, 0.875rem);
|
|
551
|
+
font-weight: 600;
|
|
552
|
+
color: var(--ic-text, #f3f4f6);
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
.git-branch {
|
|
556
|
+
font-family: var(--ic-font-mono, ui-monospace, monospace);
|
|
557
|
+
font-size: var(--ic-text-xs, 0.75rem);
|
|
558
|
+
color: var(--ic-accent, #3b82f6);
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
.git-change-count {
|
|
562
|
+
font-size: var(--ic-text-xs, 0.75rem);
|
|
563
|
+
color: var(--ic-text-muted, #9ca3af);
|
|
564
|
+
font-weight: 400;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
.changed-file {
|
|
568
|
+
display: flex;
|
|
569
|
+
align-items: center;
|
|
570
|
+
gap: var(--ic-space-sm, 0.5rem);
|
|
571
|
+
padding: var(--ic-space-xs, 0.25rem) var(--ic-space-md, 0.75rem);
|
|
572
|
+
border-top: 1px solid var(--ic-border, #374151);
|
|
573
|
+
font-size: var(--ic-text-sm, 0.875rem);
|
|
574
|
+
cursor: pointer;
|
|
575
|
+
transition: background var(--ic-transition, 150ms ease);
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
.changed-file:hover {
|
|
579
|
+
background: var(--ic-surface-2, #1f2937);
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
.changed-file--active {
|
|
583
|
+
background: var(--ic-surface-2, #1f2937);
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
.status-badge {
|
|
587
|
+
font-family: var(--ic-font-mono, ui-monospace, monospace);
|
|
588
|
+
font-size: var(--ic-text-xs, 0.75rem);
|
|
589
|
+
font-weight: 700;
|
|
590
|
+
min-width: 1.5rem;
|
|
591
|
+
text-align: center;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
.status-badge--M { color: var(--ic-warning, #f59e0b); }
|
|
595
|
+
.status-badge--A { color: var(--ic-success, #22c55e); }
|
|
596
|
+
.status-badge--D { color: var(--ic-error, #f87171); }
|
|
597
|
+
.status-badge--U { color: var(--ic-text-muted, #9ca3af); }
|
|
598
|
+
|
|
599
|
+
.changed-file-path {
|
|
600
|
+
flex: 1;
|
|
601
|
+
font-family: var(--ic-font-mono, ui-monospace, monospace);
|
|
602
|
+
font-size: var(--ic-text-xs, 0.75rem);
|
|
603
|
+
color: var(--ic-text, #f3f4f6);
|
|
604
|
+
overflow: hidden;
|
|
605
|
+
text-overflow: ellipsis;
|
|
606
|
+
white-space: nowrap;
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
.restore-btn {
|
|
610
|
+
padding: 2px 8px;
|
|
611
|
+
font-size: var(--ic-text-xs, 0.75rem);
|
|
612
|
+
background: transparent;
|
|
613
|
+
border: 1px solid var(--ic-border, #374151);
|
|
614
|
+
border-radius: var(--ic-radius-sm, 0.25rem);
|
|
615
|
+
color: var(--ic-text-muted, #9ca3af);
|
|
616
|
+
font-family: inherit;
|
|
617
|
+
cursor: pointer;
|
|
618
|
+
transition: all var(--ic-transition, 150ms ease);
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
.restore-btn:hover {
|
|
622
|
+
border-color: var(--ic-warning, #f59e0b);
|
|
623
|
+
color: var(--ic-warning, #f59e0b);
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
/* Diff viewer */
|
|
627
|
+
.diff-viewer {
|
|
628
|
+
border: 1px solid var(--ic-border, #374151);
|
|
629
|
+
border-radius: var(--ic-radius-md, 0.5rem);
|
|
630
|
+
overflow: hidden;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
.diff-header {
|
|
634
|
+
display: flex;
|
|
635
|
+
align-items: center;
|
|
636
|
+
padding: var(--ic-space-sm, 0.5rem) var(--ic-space-md, 0.75rem);
|
|
637
|
+
background: var(--ic-surface-2, #1f2937);
|
|
638
|
+
font-size: var(--ic-text-xs, 0.75rem);
|
|
639
|
+
font-family: var(--ic-font-mono, ui-monospace, monospace);
|
|
640
|
+
color: var(--ic-text-muted, #9ca3af);
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
.diff-content {
|
|
644
|
+
font-family: var(--ic-font-mono, ui-monospace, monospace);
|
|
645
|
+
font-size: var(--ic-text-sm, 0.875rem);
|
|
646
|
+
line-height: 1.5;
|
|
647
|
+
margin: 0;
|
|
648
|
+
padding: var(--ic-space-md, 0.75rem);
|
|
649
|
+
overflow-x: auto;
|
|
650
|
+
max-height: 400px;
|
|
651
|
+
overflow-y: auto;
|
|
652
|
+
background: var(--ic-surface-2, #1f2937);
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
.diff-add {
|
|
656
|
+
background: color-mix(in srgb, #22c55e 15%, transparent);
|
|
657
|
+
color: #86efac;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
.diff-del {
|
|
661
|
+
background: color-mix(in srgb, #ef4444 15%, transparent);
|
|
662
|
+
color: #fca5a5;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
.diff-hunk {
|
|
666
|
+
color: var(--ic-info, #06b6d4);
|
|
667
|
+
font-weight: 600;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
.diff-ctx {
|
|
671
|
+
color: var(--ic-text, #f3f4f6);
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
.diff-empty {
|
|
675
|
+
padding: var(--ic-space-lg, 1rem);
|
|
676
|
+
text-align: center;
|
|
677
|
+
color: var(--ic-text-dim, #858d9d);
|
|
678
|
+
font-size: var(--ic-text-sm, 0.875rem);
|
|
679
|
+
font-style: italic;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
/* Commit form */
|
|
683
|
+
.commit-form {
|
|
684
|
+
display: flex;
|
|
685
|
+
gap: var(--ic-space-sm, 0.5rem);
|
|
686
|
+
padding: var(--ic-space-md, 0.75rem);
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
.commit-input {
|
|
690
|
+
flex: 1;
|
|
691
|
+
padding: var(--ic-space-sm, 0.5rem) var(--ic-space-md, 0.75rem);
|
|
692
|
+
background: var(--ic-surface-1, #111827);
|
|
693
|
+
border: 1px solid var(--ic-border, #374151);
|
|
694
|
+
border-radius: var(--ic-radius-md, 0.5rem);
|
|
695
|
+
color: var(--ic-text, #f3f4f6);
|
|
696
|
+
font-size: var(--ic-text-sm, 0.875rem);
|
|
697
|
+
font-family: inherit;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
.commit-input::placeholder {
|
|
701
|
+
color: var(--ic-text-dim, #858d9d);
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
/* Commit log */
|
|
705
|
+
.commit-entry {
|
|
706
|
+
display: flex;
|
|
707
|
+
align-items: baseline;
|
|
708
|
+
gap: var(--ic-space-sm, 0.5rem);
|
|
709
|
+
padding: var(--ic-space-xs, 0.25rem) var(--ic-space-md, 0.75rem);
|
|
710
|
+
border-top: 1px solid var(--ic-border, #374151);
|
|
711
|
+
font-size: var(--ic-text-sm, 0.875rem);
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
.commit-sha {
|
|
715
|
+
font-family: var(--ic-font-mono, ui-monospace, monospace);
|
|
716
|
+
font-size: var(--ic-text-xs, 0.75rem);
|
|
717
|
+
color: var(--ic-accent, #3b82f6);
|
|
718
|
+
flex-shrink: 0;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
.commit-message {
|
|
722
|
+
flex: 1;
|
|
723
|
+
color: var(--ic-text, #f3f4f6);
|
|
724
|
+
overflow: hidden;
|
|
725
|
+
text-overflow: ellipsis;
|
|
726
|
+
white-space: nowrap;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
.commit-time {
|
|
730
|
+
flex-shrink: 0;
|
|
731
|
+
font-size: var(--ic-text-xs, 0.75rem);
|
|
732
|
+
color: var(--ic-text-muted, #9ca3af);
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
.clean-message {
|
|
736
|
+
padding: var(--ic-space-md, 0.75rem);
|
|
737
|
+
text-align: center;
|
|
738
|
+
color: var(--ic-text-dim, #858d9d);
|
|
739
|
+
font-size: var(--ic-text-sm, 0.875rem);
|
|
740
|
+
font-style: italic;
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
/* --- Error state --- */
|
|
744
|
+
.error-container {
|
|
745
|
+
text-align: center;
|
|
746
|
+
padding: var(--ic-space-2xl, 3rem);
|
|
747
|
+
color: var(--ic-text-muted, #9ca3af);
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
.error-message {
|
|
751
|
+
margin-bottom: var(--ic-space-md, 0.75rem);
|
|
752
|
+
color: var(--ic-error, #f87171);
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
.retry-btn {
|
|
756
|
+
padding: var(--ic-space-sm, 0.5rem) var(--ic-space-md, 0.75rem);
|
|
757
|
+
background: transparent;
|
|
758
|
+
border: 1px solid var(--ic-border, #374151);
|
|
759
|
+
border-radius: var(--ic-radius-md, 0.5rem);
|
|
760
|
+
color: var(--ic-text, #f3f4f6);
|
|
761
|
+
font-size: var(--ic-text-sm, 0.875rem);
|
|
762
|
+
font-family: inherit;
|
|
763
|
+
cursor: pointer;
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
.retry-btn:hover {
|
|
767
|
+
border-color: var(--ic-accent, #3b82f6);
|
|
768
|
+
color: var(--ic-accent, #3b82f6);
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
/* --- Responsive --- */
|
|
772
|
+
@media (max-width: 767px) {
|
|
773
|
+
.workspace-layout {
|
|
774
|
+
grid-template-columns: 1fr;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
.file-tree {
|
|
778
|
+
border-right: none;
|
|
779
|
+
border-bottom: 1px solid var(--ic-border, #374151);
|
|
780
|
+
padding-right: 0;
|
|
781
|
+
padding-bottom: var(--ic-space-md, 0.75rem);
|
|
782
|
+
max-height: 250px;
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
`];a([h({attribute:!1})],r.prototype,"rpcClient",2);a([h()],r.prototype,"agentId",2);a([s()],r.prototype,"_status",2);a([s()],r.prototype,"_loadState",2);a([s()],r.prototype,"_error",2);a([s()],r.prototype,"_activeTab",2);a([s()],r.prototype,"_selectedFile",2);a([s()],r.prototype,"_selectedSubdir",2);a([s()],r.prototype,"_fileContent",2);a([s()],r.prototype,"_editedContent",2);a([s()],r.prototype,"_dirEntries",2);a([s()],r.prototype,"_saving",2);a([s()],r.prototype,"_dirty",2);a([s()],r.prototype,"_confirmAction",2);a([s()],r.prototype,"_actionPending",2);a([s()],r.prototype,"_gitStatus",2);a([s()],r.prototype,"_gitLog",2);a([s()],r.prototype,"_gitDiff",2);a([s()],r.prototype,"_gitDiffFile",2);a([s()],r.prototype,"_commitMessage",2);a([s()],r.prototype,"_committing",2);a([s()],r.prototype,"_restoreTarget",2);r=a([_("ic-workspace-manager")],r);export{r as IcWorkspaceManager};
|