claudeck 1.2.0 → 1.3.0
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/README.md +64 -5
- package/cli.js +53 -4
- package/package.json +3 -2
- package/public/css/core/responsive.css +2 -2
- package/public/css/ui/file-picker.css +243 -17
- package/public/css/ui/messages.css +72 -9
- package/public/css/ui/toolbox.css +43 -0
- package/public/index.html +80 -745
- package/public/js/components/add-project-modal.js +27 -0
- package/public/js/components/agent-modal.js +73 -0
- package/public/js/components/agent-monitor-modal.js +19 -0
- package/public/js/components/bg-confirm-modal.js +22 -0
- package/public/js/components/chain-modal.js +52 -0
- package/public/js/components/cost-dashboard-modal.js +39 -0
- package/public/js/components/dag-editor-modal.js +55 -0
- package/public/js/components/file-picker-modal.js +45 -0
- package/public/js/components/linear-create-modal.js +43 -0
- package/public/js/components/mcp-modal.js +58 -0
- package/public/js/components/orchestrate-modal.js +40 -0
- package/public/js/components/permission-modal.js +30 -0
- package/public/js/components/prompt-modal.js +31 -0
- package/public/js/components/shortcuts-modal.js +45 -0
- package/public/js/components/status-bar.js +97 -0
- package/public/js/components/system-prompt-modal.js +29 -0
- package/public/js/components/telegram-modal.js +84 -0
- package/public/js/components/welcome-overlay.js +60 -0
- package/public/js/components/workflow-modal.js +41 -0
- package/public/js/core/api.js +10 -0
- package/public/js/core/dom.js +3 -2
- package/public/js/core/ws.js +7 -1
- package/public/js/features/attachments.js +226 -23
- package/public/js/features/projects.js +7 -0
- package/public/js/main.js +22 -0
- package/public/js/ui/shortcuts.js +4 -8
- package/public/login.html +470 -0
- package/public/offline.html +300 -168
- package/public/sw.js +10 -2
- package/server/auth.js +141 -0
- package/server.js +14 -3
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
class AddProjectModal extends HTMLElement {
|
|
2
|
+
connectedCallback() {
|
|
3
|
+
this.innerHTML = `
|
|
4
|
+
<div id="add-project-modal" class="modal-overlay hidden">
|
|
5
|
+
<div class="modal add-project-modal">
|
|
6
|
+
<div class="modal-header">
|
|
7
|
+
<h3>Add Project</h3>
|
|
8
|
+
<button id="add-project-close" class="modal-close">×</button>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="add-project-body">
|
|
11
|
+
<div id="folder-breadcrumb" class="folder-breadcrumb"></div>
|
|
12
|
+
<div id="folder-list" class="folder-list"></div>
|
|
13
|
+
<div class="folder-select-row">
|
|
14
|
+
<input id="add-project-name" type="text" placeholder="Project name" autocomplete="off">
|
|
15
|
+
<button id="add-project-confirm" class="modal-btn-save">Add</button>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</div>`;
|
|
20
|
+
|
|
21
|
+
const overlay = this.querySelector('#add-project-modal');
|
|
22
|
+
const closeBtn = this.querySelector('#add-project-close');
|
|
23
|
+
if (closeBtn) closeBtn.addEventListener('click', () => overlay.classList.add('hidden'));
|
|
24
|
+
if (overlay) overlay.addEventListener('click', (e) => { if (e.target === overlay) overlay.classList.add('hidden'); });
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
customElements.define('claudeck-add-project', AddProjectModal);
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
class AgentModal extends HTMLElement {
|
|
2
|
+
connectedCallback() {
|
|
3
|
+
this.innerHTML = `
|
|
4
|
+
<div id="agent-modal" class="modal-overlay hidden">
|
|
5
|
+
<div class="modal agent-form-modal">
|
|
6
|
+
<div class="modal-header">
|
|
7
|
+
<h3 id="agent-modal-title">New Agent</h3>
|
|
8
|
+
<button id="agent-modal-close" class="modal-close">×</button>
|
|
9
|
+
</div>
|
|
10
|
+
<form id="agent-form">
|
|
11
|
+
<div class="af-section">
|
|
12
|
+
<div class="af-section-label">Identity</div>
|
|
13
|
+
<div class="af-grid-2">
|
|
14
|
+
<div class="af-field">
|
|
15
|
+
<label for="agent-form-title">Title</label>
|
|
16
|
+
<input id="agent-form-title" type="text" placeholder="e.g. Code Documenter" required>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="af-field">
|
|
19
|
+
<label for="agent-form-icon">Icon</label>
|
|
20
|
+
<select id="agent-form-icon">
|
|
21
|
+
<option value="search">Search</option>
|
|
22
|
+
<option value="bug">Bug</option>
|
|
23
|
+
<option value="check">Check</option>
|
|
24
|
+
<option value="tool" selected>Tool</option>
|
|
25
|
+
</select>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
<div class="af-field">
|
|
29
|
+
<label for="agent-form-desc">Description</label>
|
|
30
|
+
<input id="agent-form-desc" type="text" placeholder="Short description of what this agent does" required>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="af-section">
|
|
34
|
+
<div class="af-section-label">Behavior</div>
|
|
35
|
+
<div class="af-field">
|
|
36
|
+
<label for="agent-form-goal">Goal</label>
|
|
37
|
+
<textarea id="agent-form-goal" rows="4" placeholder="Describe the agent's goal in detail. Be specific about what files to look at, what to check, and what output to produce..." required></textarea>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
<div class="af-section">
|
|
41
|
+
<div class="af-section-label">Constraints</div>
|
|
42
|
+
<div class="af-grid-2">
|
|
43
|
+
<div class="af-field">
|
|
44
|
+
<label for="agent-form-max-turns">Max Turns</label>
|
|
45
|
+
<div class="af-input-with-hint">
|
|
46
|
+
<input id="agent-form-max-turns" type="number" min="1" max="200" value="50">
|
|
47
|
+
<span class="af-hint">1 - 200</span>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
<div class="af-field">
|
|
51
|
+
<label for="agent-form-timeout">Timeout (seconds)</label>
|
|
52
|
+
<div class="af-input-with-hint">
|
|
53
|
+
<input id="agent-form-timeout" type="number" min="30" max="3600" value="300">
|
|
54
|
+
<span class="af-hint">30 - 3600</span>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
<input id="agent-form-edit-id" type="hidden">
|
|
60
|
+
<div class="modal-actions">
|
|
61
|
+
<button type="button" id="agent-modal-cancel" class="modal-btn-cancel">Cancel</button>
|
|
62
|
+
<button type="submit" class="modal-btn-save">Save Agent</button>
|
|
63
|
+
</div>
|
|
64
|
+
</form>
|
|
65
|
+
</div>
|
|
66
|
+
</div>`;
|
|
67
|
+
|
|
68
|
+
const overlay = this.querySelector('#agent-modal');
|
|
69
|
+
this.querySelector('#agent-modal-close').addEventListener('click', () => overlay.classList.add('hidden'));
|
|
70
|
+
overlay.addEventListener('click', (e) => { if (e.target === overlay) overlay.classList.add('hidden'); });
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
customElements.define('claudeck-agent-modal', AgentModal);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
class AgentMonitorModal extends HTMLElement {
|
|
2
|
+
connectedCallback() {
|
|
3
|
+
this.innerHTML = `
|
|
4
|
+
<div id="agent-monitor-modal" class="modal-overlay hidden">
|
|
5
|
+
<div class="modal agent-monitor-modal">
|
|
6
|
+
<div class="modal-header">
|
|
7
|
+
<h3>Agent Monitor</h3>
|
|
8
|
+
<button id="agent-monitor-close" class="modal-close">×</button>
|
|
9
|
+
</div>
|
|
10
|
+
<div id="agent-monitor-content"></div>
|
|
11
|
+
</div>
|
|
12
|
+
</div>`;
|
|
13
|
+
|
|
14
|
+
const overlay = this.querySelector('#agent-monitor-modal');
|
|
15
|
+
this.querySelector('#agent-monitor-close').addEventListener('click', () => overlay.classList.add('hidden'));
|
|
16
|
+
overlay.addEventListener('click', (e) => { if (e.target === overlay) overlay.classList.add('hidden'); });
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
customElements.define('claudeck-agent-monitor-modal', AgentMonitorModal);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Web Component: Background Session Confirmation Dialog
|
|
2
|
+
class ClaudeckBgConfirm extends HTMLElement {
|
|
3
|
+
connectedCallback() {
|
|
4
|
+
this.innerHTML = `
|
|
5
|
+
<div id="bg-confirm-modal" class="modal-overlay hidden" data-persistent>
|
|
6
|
+
<div class="modal bg-confirm-modal">
|
|
7
|
+
<div class="modal-header">
|
|
8
|
+
<h3>Session In Progress</h3>
|
|
9
|
+
</div>
|
|
10
|
+
<p class="bg-confirm-text">Claude is still responding in this session. What would you like to do?</p>
|
|
11
|
+
<div class="modal-actions bg-confirm-actions">
|
|
12
|
+
<button id="bg-confirm-cancel" class="modal-btn-cancel">Cancel</button>
|
|
13
|
+
<button id="bg-confirm-abort" class="modal-btn-cancel bg-confirm-abort-btn">Abort Session</button>
|
|
14
|
+
<button id="bg-confirm-background" class="modal-btn-save">Continue in Background</button>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
`;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
customElements.define('claudeck-bg-confirm', ClaudeckBgConfirm);
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
class ChainModal extends HTMLElement {
|
|
2
|
+
connectedCallback() {
|
|
3
|
+
this.innerHTML = `
|
|
4
|
+
<div id="chain-modal" class="modal-overlay hidden">
|
|
5
|
+
<div class="modal agent-form-modal">
|
|
6
|
+
<div class="modal-header">
|
|
7
|
+
<h3 id="chain-modal-title">New Chain</h3>
|
|
8
|
+
<button id="chain-modal-close" class="modal-close">×</button>
|
|
9
|
+
</div>
|
|
10
|
+
<form id="chain-form">
|
|
11
|
+
<div class="af-section">
|
|
12
|
+
<div class="af-section-label">Details</div>
|
|
13
|
+
<div class="af-field">
|
|
14
|
+
<label for="chain-form-title">Title</label>
|
|
15
|
+
<input id="chain-form-title" type="text" placeholder="e.g. Full Code Review Pipeline" required>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="af-field">
|
|
18
|
+
<label for="chain-form-desc">Description</label>
|
|
19
|
+
<input id="chain-form-desc" type="text" placeholder="Short description of the chain">
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="af-section">
|
|
23
|
+
<div class="af-section-label">Pipeline</div>
|
|
24
|
+
<div id="chain-agent-list" class="chain-agent-list"></div>
|
|
25
|
+
<button type="button" id="chain-add-agent-btn" class="chain-add-agent-btn">+ Add Agent Step</button>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="af-section">
|
|
28
|
+
<div class="af-section-label">Settings</div>
|
|
29
|
+
<div class="af-field">
|
|
30
|
+
<label for="chain-form-context">Context Passing</label>
|
|
31
|
+
<select id="chain-form-context">
|
|
32
|
+
<option value="summary">Summary (recommended)</option>
|
|
33
|
+
<option value="full">Full output</option>
|
|
34
|
+
<option value="none">None</option>
|
|
35
|
+
</select>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
<input id="chain-form-edit-id" type="hidden">
|
|
39
|
+
<div class="modal-actions">
|
|
40
|
+
<button type="button" id="chain-modal-cancel" class="modal-btn-cancel">Cancel</button>
|
|
41
|
+
<button type="submit" class="modal-btn-save">Save Chain</button>
|
|
42
|
+
</div>
|
|
43
|
+
</form>
|
|
44
|
+
</div>
|
|
45
|
+
</div>`;
|
|
46
|
+
|
|
47
|
+
const overlay = this.querySelector('#chain-modal');
|
|
48
|
+
this.querySelector('#chain-modal-close').addEventListener('click', () => overlay.classList.add('hidden'));
|
|
49
|
+
overlay.addEventListener('click', (e) => { if (e.target === overlay) overlay.classList.add('hidden'); });
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
customElements.define('claudeck-chain-modal', ChainModal);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
class CostDashboardModal extends HTMLElement {
|
|
2
|
+
connectedCallback() {
|
|
3
|
+
this.innerHTML = `
|
|
4
|
+
<div id="cost-dashboard-modal" class="modal-overlay hidden">
|
|
5
|
+
<div class="modal cost-dashboard-modal">
|
|
6
|
+
<div class="modal-header">
|
|
7
|
+
<h3>Cost Dashboard</h3>
|
|
8
|
+
<button id="cost-modal-close" class="modal-close">×</button>
|
|
9
|
+
</div>
|
|
10
|
+
<div id="cost-dashboard-content">
|
|
11
|
+
<div class="cost-summary-cards" id="cost-summary-cards"></div>
|
|
12
|
+
<div class="cost-table-container">
|
|
13
|
+
<table class="cost-table">
|
|
14
|
+
<thead>
|
|
15
|
+
<tr>
|
|
16
|
+
<th data-sort="title">Session</th>
|
|
17
|
+
<th data-sort="turns">Turns</th>
|
|
18
|
+
<th data-sort="tokens">Tokens</th>
|
|
19
|
+
<th data-sort="cost">Cost</th>
|
|
20
|
+
</tr>
|
|
21
|
+
</thead>
|
|
22
|
+
<tbody id="cost-table-body"></tbody>
|
|
23
|
+
</table>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="cost-chart-section">
|
|
26
|
+
<h4>Daily Costs (Last 30 Days)</h4>
|
|
27
|
+
<div class="cost-chart" id="cost-chart"></div>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</div>`;
|
|
32
|
+
|
|
33
|
+
const overlay = this.querySelector('#cost-dashboard-modal');
|
|
34
|
+
const closeBtn = this.querySelector('#cost-modal-close');
|
|
35
|
+
if (closeBtn) closeBtn.addEventListener('click', () => overlay.classList.add('hidden'));
|
|
36
|
+
if (overlay) overlay.addEventListener('click', (e) => { if (e.target === overlay) overlay.classList.add('hidden'); });
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
customElements.define('claudeck-cost-dashboard', CostDashboardModal);
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
class DagEditorModal extends HTMLElement {
|
|
2
|
+
connectedCallback() {
|
|
3
|
+
this.innerHTML = `
|
|
4
|
+
<div id="dag-modal" class="modal-overlay hidden">
|
|
5
|
+
<div class="modal dag-modal-wide">
|
|
6
|
+
<div class="modal-header">
|
|
7
|
+
<h3 id="dag-modal-title">New DAG</h3>
|
|
8
|
+
<button id="dag-modal-close" class="modal-close">×</button>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="dag-explainer af-section">
|
|
11
|
+
<div class="af-section-label">What is a DAG?</div>
|
|
12
|
+
<div class="orch-explainer">
|
|
13
|
+
<p class="dag-explainer-text">A <strong>DAG</strong> (Directed Acyclic Graph) lets you run agents in parallel when they have no dependencies, and sequentially when one depends on another's output.</p>
|
|
14
|
+
<div class="orch-explainer-steps">
|
|
15
|
+
<div class="orch-step"><span class="orch-step-num">1</span><span><strong>Drag agents</strong> from the palette onto the canvas</span></div>
|
|
16
|
+
<div class="orch-step"><span class="orch-step-num">2</span><span><strong>Connect outputs → inputs</strong> by dragging between ports to define dependencies</span></div>
|
|
17
|
+
<div class="orch-step"><span class="orch-step-num">3</span><span><strong>Click an edge</strong> to remove a connection</span></div>
|
|
18
|
+
<div class="orch-step"><span class="orch-step-num">4</span><span>Agents on the same level <strong>run in parallel</strong>, dependent agents wait</span></div>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="dag-editor-toolbar af-section">
|
|
23
|
+
<div class="af-section-label">Details</div>
|
|
24
|
+
<div class="af-grid-2">
|
|
25
|
+
<div class="af-field">
|
|
26
|
+
<label for="dag-form-title">Title</label>
|
|
27
|
+
<input id="dag-form-title" type="text" placeholder="e.g. Full Review Pipeline" required>
|
|
28
|
+
</div>
|
|
29
|
+
<div class="af-field">
|
|
30
|
+
<label for="dag-form-desc">Description</label>
|
|
31
|
+
<input id="dag-form-desc" type="text" placeholder="Short description">
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="dag-editor-body">
|
|
36
|
+
<div class="dag-node-palette" id="dag-node-palette"></div>
|
|
37
|
+
<div class="dag-canvas-wrap">
|
|
38
|
+
<svg id="dag-canvas" class="dag-canvas"></svg>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
<input id="dag-form-edit-id" type="hidden">
|
|
42
|
+
<div class="modal-actions">
|
|
43
|
+
<button type="button" id="dag-modal-cancel" class="modal-btn-cancel">Cancel</button>
|
|
44
|
+
<button type="button" id="dag-auto-layout" class="modal-btn-cancel">Auto Layout</button>
|
|
45
|
+
<button type="button" id="dag-modal-save" class="modal-btn-save">Save DAG</button>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</div>`;
|
|
49
|
+
|
|
50
|
+
const overlay = this.querySelector('#dag-modal');
|
|
51
|
+
this.querySelector('#dag-modal-close').addEventListener('click', () => overlay.classList.add('hidden'));
|
|
52
|
+
overlay.addEventListener('click', (e) => { if (e.target === overlay) overlay.classList.add('hidden'); });
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
customElements.define('claudeck-dag-editor', DagEditorModal);
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
class FilePickerModal extends HTMLElement {
|
|
2
|
+
connectedCallback() {
|
|
3
|
+
this.innerHTML = `
|
|
4
|
+
<div id="file-picker-modal" class="modal-overlay hidden">
|
|
5
|
+
<div class="modal file-picker-modal">
|
|
6
|
+
<div class="modal-header">
|
|
7
|
+
<h3>Attach Files</h3>
|
|
8
|
+
<button id="fp-modal-close" class="modal-close">×</button>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="fp-info-banner">
|
|
11
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
12
|
+
<circle cx="12" cy="12" r="10"/><line x1="12" y1="16" x2="12" y2="12"/><line x1="12" y1="8" x2="12.01" y2="8"/>
|
|
13
|
+
</svg>
|
|
14
|
+
<span>Text files up to <strong>50 KB</strong> · Binary files are not supported</span>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="fp-search-wrap">
|
|
17
|
+
<svg class="fp-search-icon" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
18
|
+
<circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/>
|
|
19
|
+
</svg>
|
|
20
|
+
<input id="fp-search" type="text" class="file-picker-search" placeholder="Search files..." autocomplete="off">
|
|
21
|
+
</div>
|
|
22
|
+
<div id="fp-selected" class="fp-selected-strip hidden"></div>
|
|
23
|
+
<div id="fp-list" class="file-picker-list"></div>
|
|
24
|
+
<div id="fp-empty" class="fp-empty-state hidden">
|
|
25
|
+
<svg width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
|
26
|
+
<path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"/><polyline points="13 2 13 9 20 9"/>
|
|
27
|
+
</svg>
|
|
28
|
+
<span>No files match your search</span>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="file-picker-footer">
|
|
31
|
+
<span id="fp-count">0 files selected</span>
|
|
32
|
+
<button id="fp-done-btn" class="modal-btn-save">Done</button>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</div>`;
|
|
36
|
+
|
|
37
|
+
const overlay = this.querySelector('#file-picker-modal');
|
|
38
|
+
const closeBtn = this.querySelector('#fp-modal-close');
|
|
39
|
+
const doneBtn = this.querySelector('#fp-done-btn');
|
|
40
|
+
if (closeBtn) closeBtn.addEventListener('click', () => overlay.classList.add('hidden'));
|
|
41
|
+
if (doneBtn) doneBtn.addEventListener('click', () => overlay.classList.add('hidden'));
|
|
42
|
+
if (overlay) overlay.addEventListener('click', (e) => { if (e.target === overlay) overlay.classList.add('hidden'); });
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
customElements.define('claudeck-file-picker', FilePickerModal);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// Web Component: Linear Create Issue Modal
|
|
2
|
+
class ClaudeckLinearCreate extends HTMLElement {
|
|
3
|
+
connectedCallback() {
|
|
4
|
+
this.innerHTML = `
|
|
5
|
+
<div id="linear-create-modal" class="modal-overlay hidden">
|
|
6
|
+
<div class="modal">
|
|
7
|
+
<div class="modal-header">
|
|
8
|
+
<h3>Create Issue</h3>
|
|
9
|
+
<button id="linear-create-close" class="modal-close">×</button>
|
|
10
|
+
</div>
|
|
11
|
+
<form id="linear-create-form">
|
|
12
|
+
<label for="linear-create-title">Title</label>
|
|
13
|
+
<input id="linear-create-title" type="text" placeholder="Issue title" required>
|
|
14
|
+
<label for="linear-create-desc">Description</label>
|
|
15
|
+
<textarea id="linear-create-desc" rows="3" placeholder="Optional description..."></textarea>
|
|
16
|
+
<label for="linear-create-team">Project (Team)</label>
|
|
17
|
+
<select id="linear-create-team" required>
|
|
18
|
+
<option value="">Select a team...</option>
|
|
19
|
+
</select>
|
|
20
|
+
<label for="linear-create-state">State</label>
|
|
21
|
+
<select id="linear-create-state" disabled>
|
|
22
|
+
<option value="">Select a team first...</option>
|
|
23
|
+
</select>
|
|
24
|
+
<div class="modal-actions">
|
|
25
|
+
<button type="button" id="linear-create-cancel" class="modal-btn-cancel">Cancel</button>
|
|
26
|
+
<button type="submit" id="linear-create-submit" class="modal-btn-save">Create</button>
|
|
27
|
+
</div>
|
|
28
|
+
</form>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
`;
|
|
32
|
+
|
|
33
|
+
const overlay = this.querySelector('#linear-create-modal');
|
|
34
|
+
const closeBtn = this.querySelector('#linear-create-close');
|
|
35
|
+
|
|
36
|
+
closeBtn.addEventListener('click', () => overlay.classList.add('hidden'));
|
|
37
|
+
overlay.addEventListener('click', (e) => {
|
|
38
|
+
if (e.target === overlay) overlay.classList.add('hidden');
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
customElements.define('claudeck-linear-create', ClaudeckLinearCreate);
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// Web Component: MCP Server Management Modal
|
|
2
|
+
class ClaudeckMcpModal extends HTMLElement {
|
|
3
|
+
connectedCallback() {
|
|
4
|
+
this.innerHTML = `
|
|
5
|
+
<div id="mcp-modal" class="modal-overlay hidden">
|
|
6
|
+
<div class="modal mcp-modal">
|
|
7
|
+
<div class="modal-header">
|
|
8
|
+
<h3>MCP Servers</h3>
|
|
9
|
+
<button id="mcp-modal-close" class="modal-close">×</button>
|
|
10
|
+
</div>
|
|
11
|
+
<div id="mcp-server-list" class="mcp-server-list"></div>
|
|
12
|
+
<div id="mcp-form-container" class="mcp-form-container hidden">
|
|
13
|
+
<h4 id="mcp-form-title" class="mcp-form-title">Add Server</h4>
|
|
14
|
+
<form id="mcp-form">
|
|
15
|
+
<label for="mcp-name">Name</label>
|
|
16
|
+
<input id="mcp-name" type="text" placeholder="my-server" required>
|
|
17
|
+
<label for="mcp-type">Type</label>
|
|
18
|
+
<select id="mcp-type">
|
|
19
|
+
<option value="stdio">stdio</option>
|
|
20
|
+
<option value="sse">sse</option>
|
|
21
|
+
<option value="http">http</option>
|
|
22
|
+
</select>
|
|
23
|
+
<div id="mcp-stdio-fields">
|
|
24
|
+
<label for="mcp-command">Command</label>
|
|
25
|
+
<input id="mcp-command" type="text" placeholder="npx -y @modelcontextprotocol/server-name">
|
|
26
|
+
<label for="mcp-args">Args (one per line)</label>
|
|
27
|
+
<textarea id="mcp-args" rows="2" placeholder="--flag value"></textarea>
|
|
28
|
+
<label for="mcp-env">Environment (KEY=VALUE, one per line)</label>
|
|
29
|
+
<textarea id="mcp-env" rows="2" placeholder="API_KEY=xxx"></textarea>
|
|
30
|
+
</div>
|
|
31
|
+
<div id="mcp-url-fields" class="hidden">
|
|
32
|
+
<label for="mcp-url">URL</label>
|
|
33
|
+
<input id="mcp-url" type="text" placeholder="https://...">
|
|
34
|
+
</div>
|
|
35
|
+
<div class="modal-actions">
|
|
36
|
+
<button type="button" id="mcp-form-cancel" class="modal-btn-cancel">Cancel</button>
|
|
37
|
+
<button type="submit" id="mcp-form-save" class="modal-btn-save">Save</button>
|
|
38
|
+
</div>
|
|
39
|
+
</form>
|
|
40
|
+
</div>
|
|
41
|
+
<div class="mcp-modal-footer">
|
|
42
|
+
<button id="mcp-add-btn" class="modal-btn-save">+ Add Server</button>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
`;
|
|
47
|
+
|
|
48
|
+
const overlay = this.querySelector('#mcp-modal');
|
|
49
|
+
const closeBtn = this.querySelector('#mcp-modal-close');
|
|
50
|
+
|
|
51
|
+
closeBtn.addEventListener('click', () => overlay.classList.add('hidden'));
|
|
52
|
+
overlay.addEventListener('click', (e) => {
|
|
53
|
+
if (e.target === overlay) overlay.classList.add('hidden');
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
customElements.define('claudeck-mcp-modal', ClaudeckMcpModal);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
class OrchestrateModal extends HTMLElement {
|
|
2
|
+
connectedCallback() {
|
|
3
|
+
this.innerHTML = `
|
|
4
|
+
<div id="orch-modal" class="modal-overlay hidden">
|
|
5
|
+
<div class="modal agent-form-modal">
|
|
6
|
+
<div class="modal-header">
|
|
7
|
+
<h3>Orchestrate</h3>
|
|
8
|
+
<button id="orch-modal-close" class="modal-close">×</button>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="af-section">
|
|
11
|
+
<div class="af-section-label">How it works</div>
|
|
12
|
+
<div class="orch-explainer">
|
|
13
|
+
<div class="orch-explainer-steps">
|
|
14
|
+
<div class="orch-step"><span class="orch-step-num">1</span><span>Describe your task in plain language</span></div>
|
|
15
|
+
<div class="orch-step"><span class="orch-step-num">2</span><span>The orchestrator analyzes and decomposes it into sub-tasks</span></div>
|
|
16
|
+
<div class="orch-step"><span class="orch-step-num">3</span><span>Each sub-task is delegated to the best-fit agent automatically</span></div>
|
|
17
|
+
<div class="orch-step"><span class="orch-step-num">4</span><span>Results are synthesized into a unified response</span></div>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
<div class="af-section">
|
|
22
|
+
<div class="af-section-label">Task</div>
|
|
23
|
+
<div class="af-field">
|
|
24
|
+
<label for="orch-task-input">What do you need done?</label>
|
|
25
|
+
<textarea id="orch-task-input" rows="5" placeholder="e.g. Review the current changes for bugs and security issues, then write tests for any uncovered code paths, and finally refactor any code smells you find."></textarea>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
<div class="modal-actions">
|
|
29
|
+
<button type="button" id="orch-modal-cancel" class="modal-btn-cancel">Cancel</button>
|
|
30
|
+
<button type="button" id="orch-modal-run" class="modal-btn-save">Run Orchestrator</button>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</div>`;
|
|
34
|
+
|
|
35
|
+
const overlay = this.querySelector('#orch-modal');
|
|
36
|
+
this.querySelector('#orch-modal-close').addEventListener('click', () => overlay.classList.add('hidden'));
|
|
37
|
+
overlay.addEventListener('click', (e) => { if (e.target === overlay) overlay.classList.add('hidden'); });
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
customElements.define('claudeck-orchestrate-modal', OrchestrateModal);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Web Component: Permission Approval Modal
|
|
2
|
+
class ClaudeckPermissionModal extends HTMLElement {
|
|
3
|
+
connectedCallback() {
|
|
4
|
+
this.innerHTML = `
|
|
5
|
+
<div id="perm-modal" class="modal-overlay hidden" data-persistent>
|
|
6
|
+
<div class="modal perm-modal">
|
|
7
|
+
<div class="modal-header perm-modal-header">
|
|
8
|
+
<h3><span class="perm-tool-icon">⚠</span> <span id="perm-modal-tool-name">Tool Approval</span></h3>
|
|
9
|
+
</div>
|
|
10
|
+
<span id="perm-bg-badge" class="perm-bg-badge hidden"></span>
|
|
11
|
+
<div id="perm-modal-summary" class="perm-modal-summary"></div>
|
|
12
|
+
<details class="perm-modal-details">
|
|
13
|
+
<summary>Full input</summary>
|
|
14
|
+
<pre id="perm-modal-input" class="perm-modal-input"></pre>
|
|
15
|
+
</details>
|
|
16
|
+
<label class="perm-always-allow">
|
|
17
|
+
<input type="checkbox" id="perm-always-allow-cb">
|
|
18
|
+
Always allow <strong id="perm-always-allow-tool"></strong> this session
|
|
19
|
+
</label>
|
|
20
|
+
<div class="modal-actions">
|
|
21
|
+
<button id="perm-deny-btn" class="perm-deny-btn">Deny</button>
|
|
22
|
+
<button id="perm-allow-btn" class="perm-allow-btn">Allow</button>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
`;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
customElements.define('claudeck-permission-modal', ClaudeckPermissionModal);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
class PromptModal extends HTMLElement {
|
|
2
|
+
connectedCallback() {
|
|
3
|
+
this.innerHTML = `
|
|
4
|
+
<div id="prompt-modal" class="modal-overlay hidden">
|
|
5
|
+
<div class="modal">
|
|
6
|
+
<div class="modal-header">
|
|
7
|
+
<h3>New Prompt</h3>
|
|
8
|
+
<button id="modal-close" class="modal-close">×</button>
|
|
9
|
+
</div>
|
|
10
|
+
<form id="prompt-form">
|
|
11
|
+
<label for="prompt-title">Title</label>
|
|
12
|
+
<input id="prompt-title" type="text" placeholder="e.g. Optimize Imports" required>
|
|
13
|
+
<label for="prompt-desc">Description</label>
|
|
14
|
+
<input id="prompt-desc" type="text" placeholder="Short description of what it does" required>
|
|
15
|
+
<label for="prompt-text">Prompt</label>
|
|
16
|
+
<textarea id="prompt-text" rows="4" placeholder="The full prompt to send to Claude..." required></textarea>
|
|
17
|
+
<div class="modal-actions">
|
|
18
|
+
<button type="button" id="modal-cancel" class="modal-btn-cancel">Cancel</button>
|
|
19
|
+
<button type="submit" class="modal-btn-save">Save Prompt</button>
|
|
20
|
+
</div>
|
|
21
|
+
</form>
|
|
22
|
+
</div>
|
|
23
|
+
</div>`;
|
|
24
|
+
|
|
25
|
+
const overlay = this.querySelector('#prompt-modal');
|
|
26
|
+
const closeBtn = this.querySelector('#modal-close');
|
|
27
|
+
if (closeBtn) closeBtn.addEventListener('click', () => overlay.classList.add('hidden'));
|
|
28
|
+
if (overlay) overlay.addEventListener('click', (e) => { if (e.target === overlay) overlay.classList.add('hidden'); });
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
customElements.define('claudeck-prompt-modal', PromptModal);
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// Web Component: Shortcuts Modal
|
|
2
|
+
class ClaudeckShortcutsModal extends HTMLElement {
|
|
3
|
+
connectedCallback() {
|
|
4
|
+
this.innerHTML = `
|
|
5
|
+
<div id="shortcuts-modal" class="modal-overlay hidden">
|
|
6
|
+
<div class="modal">
|
|
7
|
+
<div class="modal-header">
|
|
8
|
+
<h3>Keyboard Shortcuts</h3>
|
|
9
|
+
<button id="shortcuts-modal-close" class="modal-close">×</button>
|
|
10
|
+
</div>
|
|
11
|
+
<table class="shortcuts-table">
|
|
12
|
+
<tr><td><span class="kbd">⌘K</span></td><td>Focus session search</td></tr>
|
|
13
|
+
<tr><td><span class="kbd">⌘N</span></td><td>New session</td></tr>
|
|
14
|
+
<tr><td><span class="kbd">⌘/</span></td><td>Show keyboard shortcuts</td></tr>
|
|
15
|
+
<tr><td><span class="kbd">⌘B</span></td><td>Toggle right panel</td></tr>
|
|
16
|
+
<tr><td><span class="kbd">⌘⇧E</span></td><td>Open file explorer</td></tr>
|
|
17
|
+
<tr><td><span class="kbd">⌘⇧G</span></td><td>Open git panel</td></tr>
|
|
18
|
+
<tr><td><span class="kbd">⌘⇧R</span></td><td>Open repos panel</td></tr>
|
|
19
|
+
<tr><td><span class="kbd">⌘⇧V</span></td><td>Open events panel</td></tr>
|
|
20
|
+
<tr><td><span class="kbd">⌘⇧A</span></td><td>Go to home page</td></tr>
|
|
21
|
+
<tr><td><span class="kbd">⌘⇧T</span></td><td>Toggle tips feed</td></tr>
|
|
22
|
+
<tr><td><span class="kbd">⌘1</span>–<span class="kbd">⌘4</span></td><td>Focus parallel pane 1–4</td></tr>
|
|
23
|
+
<tr><td><span class="kbd">Esc</span></td><td>Close any open modal</td></tr>
|
|
24
|
+
<tr><td><span class="kbd">Enter</span></td><td>Send message</td></tr>
|
|
25
|
+
<tr><td><span class="kbd">Shift+Enter</span></td><td>New line in input</td></tr>
|
|
26
|
+
<tr><td><span class="kbd">/</span></td><td>Slash commands autocomplete</td></tr>
|
|
27
|
+
<tr><td><span class="kbd">↑</span></td><td>Recall previous message (empty input)</td></tr>
|
|
28
|
+
<tr><td><span class="kbd">↓</span></td><td>Recall next message (in history)</td></tr>
|
|
29
|
+
<tr><td><span class="kbd">Esc</span></td><td>Cancel history navigation</td></tr>
|
|
30
|
+
</table>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
`;
|
|
34
|
+
|
|
35
|
+
const overlay = this.querySelector('#shortcuts-modal');
|
|
36
|
+
const closeBtn = this.querySelector('#shortcuts-modal-close');
|
|
37
|
+
|
|
38
|
+
closeBtn.addEventListener('click', () => overlay.classList.add('hidden'));
|
|
39
|
+
overlay.addEventListener('click', (e) => {
|
|
40
|
+
if (e.target === overlay) overlay.classList.add('hidden');
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
customElements.define('claudeck-shortcuts-modal', ClaudeckShortcutsModal);
|