@autocode-cli/autocode 0.0.42 → 0.0.44
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/dist/server/dashboard.d.ts +8 -0
- package/dist/server/dashboard.d.ts.map +1 -1
- package/dist/server/dashboard.js +932 -25
- package/dist/server/dashboard.js.map +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +23 -1
- package/dist/server/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -13,4 +13,12 @@ export declare function generateColumnEditPage(slug: string, lang: string): stri
|
|
|
13
13
|
* Generate ticket view page
|
|
14
14
|
*/
|
|
15
15
|
export declare function generateTicketViewPage(ticketKey: string, lang: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* Generate the column terminal page HTML
|
|
18
|
+
*/
|
|
19
|
+
export declare function generateColumnTerminalPage(ticketKey: string, columnSlug: string, lang: string): string;
|
|
20
|
+
/**
|
|
21
|
+
* Generate the column prompt page HTML
|
|
22
|
+
*/
|
|
23
|
+
export declare function generateColumnPromptPage(ticketKey: string, columnSlug: string, lang: string): string;
|
|
16
24
|
//# sourceMappingURL=dashboard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../../src/server/dashboard.ts"],"names":[],"mappings":"AAAA;;GAEG;AAYH;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAgM1C;
|
|
1
|
+
{"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../../src/server/dashboard.ts"],"names":[],"mappings":"AAAA;;GAEG;AAYH;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAgM1C;AAmqED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAsSzE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CA03C9E;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAujBtG;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CA0QpG"}
|
package/dist/server/dashboard.js
CHANGED
|
@@ -191,7 +191,7 @@ export function generateDashboard() {
|
|
|
191
191
|
</div>
|
|
192
192
|
|
|
193
193
|
<footer>
|
|
194
|
-
<span>AutoCode v${pkg.version} | <span id="time">${timestamp}</span></span>
|
|
194
|
+
<span>AutoCode v${pkg.version} | <span id="time">${timestamp}</span> | <code title="autodoc root">${config.root}</code></span>
|
|
195
195
|
</footer>
|
|
196
196
|
|
|
197
197
|
<script>
|
|
@@ -2150,27 +2150,55 @@ function getScript() {
|
|
|
2150
2150
|
|
|
2151
2151
|
function formatCodeBlock(content, filename) {
|
|
2152
2152
|
const lines = content.split(/\\\\n|\\n/);
|
|
2153
|
-
|
|
2153
|
+
// Détecter le langage depuis le nom de fichier
|
|
2154
|
+
let lang = 'plaintext';
|
|
2154
2155
|
if (filename) {
|
|
2155
|
-
|
|
2156
|
+
const ext = filename.split('.').pop().toLowerCase();
|
|
2157
|
+
const langMap = {
|
|
2158
|
+
'js': 'javascript', 'ts': 'typescript', 'vue': 'html', 'jsx': 'javascript',
|
|
2159
|
+
'tsx': 'typescript', 'py': 'python', 'rb': 'ruby', 'java': 'java',
|
|
2160
|
+
'go': 'go', 'rs': 'rust', 'cpp': 'cpp', 'c': 'c', 'h': 'c',
|
|
2161
|
+
'css': 'css', 'scss': 'scss', 'html': 'html', 'json': 'json',
|
|
2162
|
+
'md': 'markdown', 'sh': 'bash', 'yml': 'yaml', 'yaml': 'yaml'
|
|
2163
|
+
};
|
|
2164
|
+
lang = langMap[ext] || 'plaintext';
|
|
2156
2165
|
}
|
|
2157
|
-
|
|
2166
|
+
// Extraire le code sans les numéros de ligne pour highlight.js
|
|
2167
|
+
let codeLines = [];
|
|
2158
2168
|
for (const line of lines) {
|
|
2159
|
-
const match = line.match(/^\\s
|
|
2169
|
+
const match = line.match(/^\\s*\\d+[→|](.*)$/);
|
|
2160
2170
|
if (match) {
|
|
2161
|
-
|
|
2171
|
+
codeLines.push(match[1]);
|
|
2162
2172
|
} else if (line.trim()) {
|
|
2163
|
-
|
|
2173
|
+
codeLines.push(line);
|
|
2164
2174
|
}
|
|
2165
2175
|
}
|
|
2166
|
-
|
|
2176
|
+
const codeContent = codeLines.join('\\n');
|
|
2177
|
+
const lineCount = codeLines.length;
|
|
2178
|
+
const preview = filename || (lineCount + ' lignes');
|
|
2179
|
+
|
|
2180
|
+
let html = '<details class="log-code-block">';
|
|
2181
|
+
html += '<summary class="log-code-header"><span class="code-lang">' + lang + '</span> ' + escapeHtml(preview) + '</summary>';
|
|
2182
|
+
html += '<pre><code class="language-' + lang + '">' + escapeHtml(codeContent) + '</code></pre>';
|
|
2183
|
+
html += '</details>';
|
|
2167
2184
|
return html;
|
|
2168
2185
|
}
|
|
2169
2186
|
|
|
2170
2187
|
function formatLogContent(rawContent) {
|
|
2171
2188
|
if (!rawContent) return '';
|
|
2172
|
-
|
|
2189
|
+
// Supprimer les balises <system-reminder> et leur contenu
|
|
2190
|
+
let cleanedContent = rawContent.replace(/<system-reminder>[\\s\\S]*?<\\/system-reminder>/gi, '');
|
|
2191
|
+
const lines = cleanedContent.split('\\n');
|
|
2173
2192
|
const entries = [];
|
|
2193
|
+
let textBuffer = [];
|
|
2194
|
+
|
|
2195
|
+
function flushTextBuffer() {
|
|
2196
|
+
if (textBuffer.length > 0) {
|
|
2197
|
+
const text = textBuffer.join('\\n');
|
|
2198
|
+
entries.push('<div class="log-message-card"><div class="log-message-header assistant-header">Assistant</div><div class="log-message-body">' + renderMarkdown(text) + '</div></div>');
|
|
2199
|
+
textBuffer = [];
|
|
2200
|
+
}
|
|
2201
|
+
}
|
|
2174
2202
|
|
|
2175
2203
|
for (const line of lines) {
|
|
2176
2204
|
if (!line.trim()) continue;
|
|
@@ -2178,6 +2206,7 @@ function getScript() {
|
|
|
2178
2206
|
// Timestamp line
|
|
2179
2207
|
const timestampMatch = line.match(/^\\[(\\d{4}-\\d{2}-\\d{2}T[^\\]]+)\\]\\s*(.*)$/);
|
|
2180
2208
|
if (timestampMatch) {
|
|
2209
|
+
flushTextBuffer();
|
|
2181
2210
|
const date = new Date(timestampMatch[1]);
|
|
2182
2211
|
const timeStr = date.toLocaleTimeString();
|
|
2183
2212
|
entries.push('<div class="log-entry timestamp">' + timeStr + ' - ' + escapeHtml(timestampMatch[2]) + '</div>');
|
|
@@ -2209,7 +2238,7 @@ function getScript() {
|
|
|
2209
2238
|
const textMatch = raw.match(/"type":"text","text":"([^"]+)"/);
|
|
2210
2239
|
if (textMatch) {
|
|
2211
2240
|
const decoded = textMatch[1].replace(/\\\\n/g, '\\n').replace(/\\\\"/g, '"');
|
|
2212
|
-
entries.push('<div class="log-message-card"><div class="log-message-header assistant-header">Assistant</div><div class="log-message-body">' +
|
|
2241
|
+
entries.push('<div class="log-message-card"><div class="log-message-header assistant-header">Assistant</div><div class="log-message-body">' + renderMarkdown(decoded) + '</div></div>');
|
|
2213
2242
|
continue;
|
|
2214
2243
|
}
|
|
2215
2244
|
|
|
@@ -2230,7 +2259,7 @@ function getScript() {
|
|
|
2230
2259
|
continue;
|
|
2231
2260
|
}
|
|
2232
2261
|
if (line.startsWith('[ASSISTANT]')) {
|
|
2233
|
-
entries.push('<div class="log-message-card"><div class="log-message-header assistant-header">Assistant</div><div class="log-message-body">' +
|
|
2262
|
+
entries.push('<div class="log-message-card"><div class="log-message-header assistant-header">Assistant</div><div class="log-message-body">' + renderMarkdown(line.slice(12)) + '</div></div>');
|
|
2234
2263
|
continue;
|
|
2235
2264
|
}
|
|
2236
2265
|
if (line.startsWith('[TOOL]')) {
|
|
@@ -3379,8 +3408,8 @@ export function generateTicketViewPage(ticketKey, lang) {
|
|
|
3379
3408
|
${ticket.history.map(h => {
|
|
3380
3409
|
const date = new Date(h.at);
|
|
3381
3410
|
const dateStr = date.toLocaleDateString('en-US', { day: '2-digit', month: '2-digit', year: 'numeric', hour: '2-digit', minute: '2-digit' });
|
|
3382
|
-
const showPromptBtn = h.to && h.action !== 'created' ? `<
|
|
3383
|
-
const showLogBtn = h.to && h.action !== 'created' ? `<
|
|
3411
|
+
const showPromptBtn = h.to && h.action !== 'created' ? `<a href="/ticket/${ticketKey}/${escapeHtml(h.to)}/prompt" class="btn-prompt" title="View prompt">📜</a>` : '';
|
|
3412
|
+
const showLogBtn = h.to && h.action !== 'created' ? `<a href="/ticket/${ticketKey}/${escapeHtml(h.to)}/terminal" class="btn-prompt" title="View terminal log">🖥️</a>` : '';
|
|
3384
3413
|
return `<li class="history-item">
|
|
3385
3414
|
<span class="history-action">${h.action}</span>
|
|
3386
3415
|
${h.from ? `<span class="history-from">${escapeHtml(h.from)}</span> →` : ''}
|
|
@@ -3800,33 +3829,66 @@ export function generateTicketViewPage(ticketKey, lang) {
|
|
|
3800
3829
|
|
|
3801
3830
|
function formatCodeBlock(content, filename) {
|
|
3802
3831
|
const lines = content.split(/\\\\n|\\n/);
|
|
3803
|
-
|
|
3832
|
+
// Détecter le langage depuis le nom de fichier
|
|
3833
|
+
let lang = 'plaintext';
|
|
3804
3834
|
if (filename) {
|
|
3805
|
-
|
|
3835
|
+
const ext = filename.split('.').pop().toLowerCase();
|
|
3836
|
+
const langMap = {
|
|
3837
|
+
'js': 'javascript', 'ts': 'typescript', 'vue': 'html', 'jsx': 'javascript',
|
|
3838
|
+
'tsx': 'typescript', 'py': 'python', 'rb': 'ruby', 'java': 'java',
|
|
3839
|
+
'go': 'go', 'rs': 'rust', 'cpp': 'cpp', 'c': 'c', 'h': 'c',
|
|
3840
|
+
'css': 'css', 'scss': 'scss', 'html': 'html', 'json': 'json',
|
|
3841
|
+
'md': 'markdown', 'sh': 'bash', 'yml': 'yaml', 'yaml': 'yaml'
|
|
3842
|
+
};
|
|
3843
|
+
lang = langMap[ext] || 'plaintext';
|
|
3806
3844
|
}
|
|
3807
|
-
|
|
3845
|
+
// Extraire le code sans les numéros de ligne pour highlight.js
|
|
3846
|
+
let codeLines = [];
|
|
3808
3847
|
for (const line of lines) {
|
|
3809
|
-
const match = line.match(/^\\s
|
|
3848
|
+
const match = line.match(/^\\s*\\d+[→|](.*)$/);
|
|
3810
3849
|
if (match) {
|
|
3811
|
-
|
|
3850
|
+
codeLines.push(match[1]);
|
|
3812
3851
|
} else if (line.trim()) {
|
|
3813
|
-
|
|
3852
|
+
codeLines.push(line);
|
|
3814
3853
|
}
|
|
3815
3854
|
}
|
|
3816
|
-
|
|
3855
|
+
const codeContent = codeLines.join('\\n');
|
|
3856
|
+
const lineCount = codeLines.length;
|
|
3857
|
+
const preview = filename || (lineCount + ' lignes');
|
|
3858
|
+
|
|
3859
|
+
let html = '<details class="log-code-block">';
|
|
3860
|
+
html += '<summary class="log-code-header"><span class="code-lang">' + lang + '</span> ' + escapeHtml(preview) + '</summary>';
|
|
3861
|
+
html += '<pre><code class="language-' + lang + '">' + escapeHtml(codeContent) + '</code></pre>';
|
|
3862
|
+
html += '</details>';
|
|
3817
3863
|
return html;
|
|
3818
3864
|
}
|
|
3819
3865
|
|
|
3820
3866
|
function formatLogContent(rawContent) {
|
|
3821
3867
|
if (!rawContent) return '';
|
|
3822
|
-
|
|
3868
|
+
// Supprimer les balises <system-reminder> et leur contenu
|
|
3869
|
+
let cleanedContent = rawContent.replace(/<system-reminder>[\\s\\S]*?<\\/system-reminder>/gi, '');
|
|
3870
|
+
const lines = cleanedContent.split('\\n');
|
|
3823
3871
|
const entries = [];
|
|
3872
|
+
let textBuffer = [];
|
|
3873
|
+
|
|
3874
|
+
function flushTextBuffer() {
|
|
3875
|
+
if (textBuffer.length > 0) {
|
|
3876
|
+
const text = textBuffer.join('\\n');
|
|
3877
|
+
entries.push('<div class="log-message-card"><div class="log-message-header assistant-header">Assistant</div><div class="log-message-body">' + renderMarkdown(text) + '</div></div>');
|
|
3878
|
+
textBuffer = [];
|
|
3879
|
+
}
|
|
3880
|
+
}
|
|
3824
3881
|
|
|
3825
3882
|
for (const line of lines) {
|
|
3826
|
-
|
|
3883
|
+
// Garder les lignes vides dans le buffer pour les paragraphes markdown
|
|
3884
|
+
if (!line.trim()) {
|
|
3885
|
+
if (textBuffer.length > 0) textBuffer.push('');
|
|
3886
|
+
continue;
|
|
3887
|
+
}
|
|
3827
3888
|
|
|
3828
3889
|
const timestampMatch = line.match(/^\\[(\\d{4}-\\d{2}-\\d{2}T[^\\]]+)\\]\\s*(.*)$/);
|
|
3829
3890
|
if (timestampMatch) {
|
|
3891
|
+
flushTextBuffer();
|
|
3830
3892
|
const date = new Date(timestampMatch[1]);
|
|
3831
3893
|
const timeStr = date.toLocaleTimeString();
|
|
3832
3894
|
entries.push('<div class="log-entry timestamp">' + timeStr + ' - ' + escapeHtml(timestampMatch[2]) + '</div>');
|
|
@@ -3870,7 +3932,7 @@ export function generateTicketViewPage(ticketKey, lang) {
|
|
|
3870
3932
|
const textMatch = raw.match(/"type":"text","text":"([^"]+)"/);
|
|
3871
3933
|
if (textMatch) {
|
|
3872
3934
|
const decoded = textMatch[1].replace(/\\\\n/g, '\\n').replace(/\\\\"/g, '"');
|
|
3873
|
-
entries.push('<div class="log-message-card"><div class="log-message-header assistant-header">Assistant</div><div class="log-message-body">' +
|
|
3935
|
+
entries.push('<div class="log-message-card"><div class="log-message-header assistant-header">Assistant</div><div class="log-message-body">' + renderMarkdown(decoded) + '</div></div>');
|
|
3874
3936
|
continue;
|
|
3875
3937
|
}
|
|
3876
3938
|
|
|
@@ -3886,18 +3948,22 @@ export function generateTicketViewPage(ticketKey, lang) {
|
|
|
3886
3948
|
}
|
|
3887
3949
|
|
|
3888
3950
|
if (line.startsWith('[SYSTEM]')) {
|
|
3951
|
+
flushTextBuffer();
|
|
3889
3952
|
entries.push('<div class="log-entry system"><span class="log-label">System</span><div class="log-content">' + escapeHtml(line.slice(9)) + '</div></div>');
|
|
3890
3953
|
continue;
|
|
3891
3954
|
}
|
|
3892
3955
|
if (line.startsWith('[ASSISTANT]')) {
|
|
3893
|
-
|
|
3956
|
+
flushTextBuffer();
|
|
3957
|
+
entries.push('<div class="log-message-card"><div class="log-message-header assistant-header">Assistant</div><div class="log-message-body">' + renderMarkdown(line.slice(12)) + '</div></div>');
|
|
3894
3958
|
continue;
|
|
3895
3959
|
}
|
|
3896
3960
|
if (line.startsWith('[TOOL]')) {
|
|
3961
|
+
flushTextBuffer();
|
|
3897
3962
|
entries.push('<div class="log-entry tool-call"><span class="log-tool-badge">' + escapeHtml(line.slice(7)) + '</span></div>');
|
|
3898
3963
|
continue;
|
|
3899
3964
|
}
|
|
3900
3965
|
if (line.startsWith('[RESULT]')) {
|
|
3966
|
+
flushTextBuffer();
|
|
3901
3967
|
const content = line.slice(9);
|
|
3902
3968
|
if (/^\\s*\\d+[→|]/.test(content)) {
|
|
3903
3969
|
entries.push('<div class="log-message-card"><div class="log-message-header result-header">Result</div><div class="log-message-body">' + formatCodeBlock(content) + '</div></div>');
|
|
@@ -3907,13 +3973,17 @@ export function generateTicketViewPage(ticketKey, lang) {
|
|
|
3907
3973
|
continue;
|
|
3908
3974
|
}
|
|
3909
3975
|
if (line.startsWith('[ERROR]')) {
|
|
3976
|
+
flushTextBuffer();
|
|
3910
3977
|
entries.push('<div class="log-entry error"><span class="log-label">Error</span><div class="log-content">' + escapeHtml(line.slice(8)) + '</div></div>');
|
|
3911
3978
|
continue;
|
|
3912
3979
|
}
|
|
3913
3980
|
|
|
3914
|
-
|
|
3981
|
+
// Ligne de texte brut - ajouter au buffer pour regrouper
|
|
3982
|
+
textBuffer.push(line);
|
|
3915
3983
|
}
|
|
3916
3984
|
|
|
3985
|
+
// Flush le buffer restant
|
|
3986
|
+
flushTextBuffer();
|
|
3917
3987
|
return entries.join('');
|
|
3918
3988
|
}
|
|
3919
3989
|
|
|
@@ -4038,4 +4108,841 @@ export function generateTicketViewPage(ticketKey, lang) {
|
|
|
4038
4108
|
</body>
|
|
4039
4109
|
</html>`;
|
|
4040
4110
|
}
|
|
4111
|
+
/**
|
|
4112
|
+
* Generate the column terminal page HTML
|
|
4113
|
+
*/
|
|
4114
|
+
export function generateColumnTerminalPage(ticketKey, columnSlug, lang) {
|
|
4115
|
+
const config = getConfig();
|
|
4116
|
+
const ticket = getTicket(config.root, ticketKey);
|
|
4117
|
+
// 404 page if ticket not found
|
|
4118
|
+
if (!ticket) {
|
|
4119
|
+
return `<!DOCTYPE html>
|
|
4120
|
+
<html lang="${lang}">
|
|
4121
|
+
<head>
|
|
4122
|
+
<meta charset="UTF-8">
|
|
4123
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
4124
|
+
<title>Ticket Not Found - AutoCode</title>
|
|
4125
|
+
<style>
|
|
4126
|
+
:root {
|
|
4127
|
+
--bg: #0a0a0f;
|
|
4128
|
+
--text: #f1f5f9;
|
|
4129
|
+
--accent: #6366f1;
|
|
4130
|
+
}
|
|
4131
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
4132
|
+
body {
|
|
4133
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
4134
|
+
background: var(--bg);
|
|
4135
|
+
color: var(--text);
|
|
4136
|
+
min-height: 100vh;
|
|
4137
|
+
display: flex;
|
|
4138
|
+
align-items: center;
|
|
4139
|
+
justify-content: center;
|
|
4140
|
+
}
|
|
4141
|
+
.not-found {
|
|
4142
|
+
text-align: center;
|
|
4143
|
+
padding: 48px;
|
|
4144
|
+
}
|
|
4145
|
+
h1 { font-size: 2rem; margin-bottom: 16px; }
|
|
4146
|
+
p { color: #94a3b8; margin-bottom: 24px; }
|
|
4147
|
+
a {
|
|
4148
|
+
display: inline-block;
|
|
4149
|
+
background: var(--accent);
|
|
4150
|
+
color: white;
|
|
4151
|
+
padding: 12px 24px;
|
|
4152
|
+
border-radius: 8px;
|
|
4153
|
+
text-decoration: none;
|
|
4154
|
+
font-weight: 500;
|
|
4155
|
+
}
|
|
4156
|
+
a:hover { opacity: 0.9; }
|
|
4157
|
+
</style>
|
|
4158
|
+
</head>
|
|
4159
|
+
<body>
|
|
4160
|
+
<div class="not-found">
|
|
4161
|
+
<h1>Ticket Not Found</h1>
|
|
4162
|
+
<p>Ticket ${escapeHtml(ticketKey)} does not exist or has been archived.</p>
|
|
4163
|
+
<a href="/">← Back to Dashboard</a>
|
|
4164
|
+
</div>
|
|
4165
|
+
</body>
|
|
4166
|
+
</html>`;
|
|
4167
|
+
}
|
|
4168
|
+
return `<!DOCTYPE html>
|
|
4169
|
+
<html lang="${lang}">
|
|
4170
|
+
<head>
|
|
4171
|
+
<meta charset="UTF-8">
|
|
4172
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
4173
|
+
<title>Terminal → ${escapeHtml(columnSlug)} | ${ticketKey} - AutoCode</title>
|
|
4174
|
+
<style>
|
|
4175
|
+
:root {
|
|
4176
|
+
--bg: #0a0a0f;
|
|
4177
|
+
--bg-secondary: #12121a;
|
|
4178
|
+
--bg-tertiary: #1a1a24;
|
|
4179
|
+
--text: #f1f5f9;
|
|
4180
|
+
--muted: #94a3b8;
|
|
4181
|
+
--border: #2a2a3a;
|
|
4182
|
+
--accent: #6366f1;
|
|
4183
|
+
--blue: #4dabf7;
|
|
4184
|
+
--green: #4ade80;
|
|
4185
|
+
--yellow: #facc15;
|
|
4186
|
+
--orange: #fb923c;
|
|
4187
|
+
--red: #f87171;
|
|
4188
|
+
--purple: #a78bfa;
|
|
4189
|
+
}
|
|
4190
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
4191
|
+
body {
|
|
4192
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
4193
|
+
background: var(--bg);
|
|
4194
|
+
color: var(--text);
|
|
4195
|
+
min-height: 100vh;
|
|
4196
|
+
display: flex;
|
|
4197
|
+
flex-direction: column;
|
|
4198
|
+
}
|
|
4199
|
+
.header {
|
|
4200
|
+
display: flex;
|
|
4201
|
+
align-items: center;
|
|
4202
|
+
gap: 24px;
|
|
4203
|
+
padding: 16px 24px;
|
|
4204
|
+
background: var(--bg-secondary);
|
|
4205
|
+
border-bottom: 1px solid var(--border);
|
|
4206
|
+
position: sticky;
|
|
4207
|
+
top: 0;
|
|
4208
|
+
z-index: 100;
|
|
4209
|
+
}
|
|
4210
|
+
.back-btn {
|
|
4211
|
+
color: var(--muted);
|
|
4212
|
+
text-decoration: none;
|
|
4213
|
+
font-size: 14px;
|
|
4214
|
+
display: flex;
|
|
4215
|
+
align-items: center;
|
|
4216
|
+
gap: 8px;
|
|
4217
|
+
padding: 8px 16px;
|
|
4218
|
+
background: var(--bg-tertiary);
|
|
4219
|
+
border-radius: 6px;
|
|
4220
|
+
transition: all 0.2s;
|
|
4221
|
+
}
|
|
4222
|
+
.back-btn:hover { color: var(--text); background: var(--border); }
|
|
4223
|
+
.ticket-key {
|
|
4224
|
+
font-family: 'SF Mono', Monaco, monospace;
|
|
4225
|
+
font-size: 12px;
|
|
4226
|
+
color: var(--accent);
|
|
4227
|
+
background: rgba(99, 102, 241, 0.15);
|
|
4228
|
+
padding: 4px 10px;
|
|
4229
|
+
border-radius: 4px;
|
|
4230
|
+
font-weight: 600;
|
|
4231
|
+
}
|
|
4232
|
+
.column-slug {
|
|
4233
|
+
font-family: 'SF Mono', Monaco, monospace;
|
|
4234
|
+
font-size: 14px;
|
|
4235
|
+
color: var(--green);
|
|
4236
|
+
background: rgba(74, 222, 128, 0.15);
|
|
4237
|
+
padding: 6px 12px;
|
|
4238
|
+
border-radius: 4px;
|
|
4239
|
+
font-weight: 500;
|
|
4240
|
+
}
|
|
4241
|
+
.page-title {
|
|
4242
|
+
flex: 1;
|
|
4243
|
+
font-size: 18px;
|
|
4244
|
+
font-weight: 600;
|
|
4245
|
+
display: flex;
|
|
4246
|
+
align-items: center;
|
|
4247
|
+
gap: 12px;
|
|
4248
|
+
}
|
|
4249
|
+
.main {
|
|
4250
|
+
flex: 1;
|
|
4251
|
+
padding: 24px;
|
|
4252
|
+
display: flex;
|
|
4253
|
+
flex-direction: column;
|
|
4254
|
+
}
|
|
4255
|
+
.terminal-container {
|
|
4256
|
+
flex: 1;
|
|
4257
|
+
background: var(--bg-secondary);
|
|
4258
|
+
border: 1px solid var(--border);
|
|
4259
|
+
border-radius: 12px;
|
|
4260
|
+
display: flex;
|
|
4261
|
+
flex-direction: column;
|
|
4262
|
+
overflow: hidden;
|
|
4263
|
+
}
|
|
4264
|
+
.terminal-header {
|
|
4265
|
+
display: flex;
|
|
4266
|
+
align-items: center;
|
|
4267
|
+
gap: 12px;
|
|
4268
|
+
padding: 12px 16px;
|
|
4269
|
+
background: var(--bg-tertiary);
|
|
4270
|
+
border-bottom: 1px solid var(--border);
|
|
4271
|
+
}
|
|
4272
|
+
.terminal-status {
|
|
4273
|
+
font-size: 12px;
|
|
4274
|
+
padding: 4px 12px;
|
|
4275
|
+
border-radius: 12px;
|
|
4276
|
+
font-weight: 500;
|
|
4277
|
+
}
|
|
4278
|
+
.terminal-status.idle { background: var(--bg-secondary); color: var(--muted); }
|
|
4279
|
+
.terminal-status.processing { background: rgba(251, 146, 60, 0.15); color: var(--orange); }
|
|
4280
|
+
.terminal-status.success { background: rgba(74, 222, 128, 0.15); color: var(--green); }
|
|
4281
|
+
.terminal-status.error { background: rgba(248, 113, 113, 0.15); color: var(--red); }
|
|
4282
|
+
.terminal-log {
|
|
4283
|
+
flex: 1;
|
|
4284
|
+
padding: 16px;
|
|
4285
|
+
overflow-y: auto;
|
|
4286
|
+
font-family: 'SF Mono', Monaco, Consolas, monospace;
|
|
4287
|
+
font-size: 13px;
|
|
4288
|
+
line-height: 1.6;
|
|
4289
|
+
}
|
|
4290
|
+
|
|
4291
|
+
/* Log entry styles */
|
|
4292
|
+
.log-entry {
|
|
4293
|
+
padding: 4px 0;
|
|
4294
|
+
flex-shrink: 0;
|
|
4295
|
+
}
|
|
4296
|
+
.log-entry.timestamp { color: var(--muted); font-size: 11px; }
|
|
4297
|
+
.log-entry.system { color: var(--blue); }
|
|
4298
|
+
.log-entry.error { color: var(--red); }
|
|
4299
|
+
.log-entry.tool-call { margin: 8px 0; }
|
|
4300
|
+
.log-label {
|
|
4301
|
+
display: inline-block;
|
|
4302
|
+
padding: 2px 8px;
|
|
4303
|
+
border-radius: 4px;
|
|
4304
|
+
font-size: 11px;
|
|
4305
|
+
font-weight: 600;
|
|
4306
|
+
margin-right: 8px;
|
|
4307
|
+
text-transform: uppercase;
|
|
4308
|
+
}
|
|
4309
|
+
.log-entry.system .log-label { background: rgba(77, 171, 247, 0.15); color: var(--blue); }
|
|
4310
|
+
.log-entry.error .log-label { background: rgba(248, 113, 113, 0.15); color: var(--red); }
|
|
4311
|
+
.log-tool-badge {
|
|
4312
|
+
display: inline-block;
|
|
4313
|
+
background: rgba(163, 139, 250, 0.15);
|
|
4314
|
+
color: var(--purple);
|
|
4315
|
+
padding: 4px 10px;
|
|
4316
|
+
border-radius: 4px;
|
|
4317
|
+
font-size: 12px;
|
|
4318
|
+
font-weight: 500;
|
|
4319
|
+
}
|
|
4320
|
+
.log-content { display: inline; }
|
|
4321
|
+
|
|
4322
|
+
/* Message cards */
|
|
4323
|
+
.log-message-card {
|
|
4324
|
+
background: var(--bg-tertiary);
|
|
4325
|
+
border: 1px solid var(--border);
|
|
4326
|
+
border-radius: 8px;
|
|
4327
|
+
margin: 12px 0;
|
|
4328
|
+
overflow: hidden;
|
|
4329
|
+
flex-shrink: 0;
|
|
4330
|
+
}
|
|
4331
|
+
.log-message-header {
|
|
4332
|
+
padding: 8px 12px;
|
|
4333
|
+
font-size: 11px;
|
|
4334
|
+
font-weight: 600;
|
|
4335
|
+
text-transform: uppercase;
|
|
4336
|
+
letter-spacing: 0.5px;
|
|
4337
|
+
}
|
|
4338
|
+
.assistant-header { background: rgba(99, 102, 241, 0.15); color: var(--accent); }
|
|
4339
|
+
.result-header { background: rgba(74, 222, 128, 0.15); color: var(--green); }
|
|
4340
|
+
.log-message-body {
|
|
4341
|
+
padding: 12px;
|
|
4342
|
+
line-height: 1.6;
|
|
4343
|
+
white-space: pre-wrap;
|
|
4344
|
+
word-break: break-word;
|
|
4345
|
+
}
|
|
4346
|
+
|
|
4347
|
+
/* Code blocks - collapsible */
|
|
4348
|
+
.log-code-block {
|
|
4349
|
+
background: #0d1117;
|
|
4350
|
+
border: 1px solid var(--border);
|
|
4351
|
+
border-radius: 6px;
|
|
4352
|
+
overflow: hidden;
|
|
4353
|
+
margin: 8px 0;
|
|
4354
|
+
}
|
|
4355
|
+
.log-code-block summary.log-code-header {
|
|
4356
|
+
background: #161b22;
|
|
4357
|
+
padding: 10px 14px;
|
|
4358
|
+
font-size: 12px;
|
|
4359
|
+
color: var(--muted);
|
|
4360
|
+
cursor: pointer;
|
|
4361
|
+
display: flex;
|
|
4362
|
+
align-items: center;
|
|
4363
|
+
gap: 8px;
|
|
4364
|
+
user-select: none;
|
|
4365
|
+
list-style: none;
|
|
4366
|
+
}
|
|
4367
|
+
.log-code-block summary.log-code-header::-webkit-details-marker { display: none; }
|
|
4368
|
+
.log-code-block summary.log-code-header::before {
|
|
4369
|
+
content: '▶';
|
|
4370
|
+
font-size: 10px;
|
|
4371
|
+
transition: transform 0.2s;
|
|
4372
|
+
}
|
|
4373
|
+
.log-code-block[open] summary.log-code-header::before {
|
|
4374
|
+
transform: rotate(90deg);
|
|
4375
|
+
}
|
|
4376
|
+
.log-code-block .code-lang {
|
|
4377
|
+
background: var(--accent);
|
|
4378
|
+
color: white;
|
|
4379
|
+
padding: 2px 6px;
|
|
4380
|
+
border-radius: 4px;
|
|
4381
|
+
font-size: 10px;
|
|
4382
|
+
font-weight: 600;
|
|
4383
|
+
text-transform: uppercase;
|
|
4384
|
+
}
|
|
4385
|
+
.log-code-block pre {
|
|
4386
|
+
margin: 0;
|
|
4387
|
+
padding: 0;
|
|
4388
|
+
background: transparent;
|
|
4389
|
+
}
|
|
4390
|
+
.log-code-block code {
|
|
4391
|
+
display: block;
|
|
4392
|
+
padding: 14px;
|
|
4393
|
+
overflow-x: auto;
|
|
4394
|
+
font-family: 'Fira Code', 'SF Mono', Monaco, monospace;
|
|
4395
|
+
font-size: 13px;
|
|
4396
|
+
line-height: 1.6;
|
|
4397
|
+
max-height: 500px;
|
|
4398
|
+
overflow-y: auto;
|
|
4399
|
+
}
|
|
4400
|
+
|
|
4401
|
+
.no-log {
|
|
4402
|
+
color: var(--muted);
|
|
4403
|
+
text-align: center;
|
|
4404
|
+
padding: 48px;
|
|
4405
|
+
font-size: 14px;
|
|
4406
|
+
}
|
|
4407
|
+
|
|
4408
|
+
/* Markdown styles for message bodies */
|
|
4409
|
+
.log-message-body h1 { font-size: 1.5em; font-weight: 600; margin: 0.8em 0 0.4em 0; }
|
|
4410
|
+
.log-message-body h2 { font-size: 1.3em; font-weight: 600; margin: 0.8em 0 0.4em 0; }
|
|
4411
|
+
.log-message-body h3 { font-size: 1.15em; font-weight: 600; margin: 0.8em 0 0.4em 0; }
|
|
4412
|
+
.log-message-body h4, .log-message-body h5, .log-message-body h6 { font-size: 1em; font-weight: 600; margin: 0.6em 0 0.3em 0; }
|
|
4413
|
+
.log-message-body p { margin: 0.6em 0; }
|
|
4414
|
+
.log-message-body ul, .log-message-body ol { margin: 0.6em 0; padding-left: 1.5em; }
|
|
4415
|
+
.log-message-body li { margin: 0.2em 0; }
|
|
4416
|
+
.log-message-body code { background: var(--bg); padding: 2px 5px; border-radius: 3px; font-size: 0.9em; }
|
|
4417
|
+
.log-message-body pre { background: var(--bg); padding: 12px; border-radius: 6px; overflow-x: auto; margin: 0.6em 0; }
|
|
4418
|
+
.log-message-body pre code { background: none; padding: 0; }
|
|
4419
|
+
.log-message-body blockquote { border-left: 3px solid var(--accent); padding-left: 12px; margin: 0.6em 0; color: var(--muted); font-style: italic; }
|
|
4420
|
+
.log-message-body a { color: var(--blue); text-decoration: none; }
|
|
4421
|
+
.log-message-body a:hover { text-decoration: underline; }
|
|
4422
|
+
.log-message-body strong { font-weight: 600; }
|
|
4423
|
+
.log-message-body em { font-style: italic; }
|
|
4424
|
+
.log-message-body hr { border: none; border-top: 1px solid var(--border); margin: 1em 0; }
|
|
4425
|
+
</style>
|
|
4426
|
+
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
|
4427
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css">
|
|
4428
|
+
</head>
|
|
4429
|
+
<body>
|
|
4430
|
+
<header class="header">
|
|
4431
|
+
<a href="/ticket/${ticketKey}" class="back-btn">← Retour</a>
|
|
4432
|
+
<span class="ticket-key">${ticketKey}</span>
|
|
4433
|
+
<div class="page-title">
|
|
4434
|
+
<span>Terminal →</span>
|
|
4435
|
+
<span class="column-slug">${escapeHtml(columnSlug)}</span>
|
|
4436
|
+
</div>
|
|
4437
|
+
</header>
|
|
4438
|
+
|
|
4439
|
+
<main class="main">
|
|
4440
|
+
<div class="terminal-container">
|
|
4441
|
+
<div class="terminal-header">
|
|
4442
|
+
<span class="terminal-status idle" id="terminal-status">En attente</span>
|
|
4443
|
+
</div>
|
|
4444
|
+
<div class="terminal-log" id="terminal-log">
|
|
4445
|
+
<div class="no-log">Chargement...</div>
|
|
4446
|
+
</div>
|
|
4447
|
+
</div>
|
|
4448
|
+
</main>
|
|
4449
|
+
|
|
4450
|
+
<script>
|
|
4451
|
+
const TICKET_KEY = '${ticketKey}';
|
|
4452
|
+
const COLUMN_SLUG = '${escapeHtml(columnSlug)}';
|
|
4453
|
+
|
|
4454
|
+
function escapeHtml(str) {
|
|
4455
|
+
if (typeof str !== 'string') return '';
|
|
4456
|
+
return str.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
|
|
4457
|
+
}
|
|
4458
|
+
|
|
4459
|
+
function renderMarkdown(str) {
|
|
4460
|
+
if (typeof str !== 'string') return '';
|
|
4461
|
+
try {
|
|
4462
|
+
return marked.parse(str);
|
|
4463
|
+
} catch (e) {
|
|
4464
|
+
return escapeHtml(str);
|
|
4465
|
+
}
|
|
4466
|
+
}
|
|
4467
|
+
|
|
4468
|
+
function formatCodeBlock(content, filename) {
|
|
4469
|
+
const lines = content.split(/\\\\n|\\n/);
|
|
4470
|
+
// Détecter le langage depuis le nom de fichier
|
|
4471
|
+
let lang = 'plaintext';
|
|
4472
|
+
if (filename) {
|
|
4473
|
+
const ext = filename.split('.').pop().toLowerCase();
|
|
4474
|
+
const langMap = {
|
|
4475
|
+
'js': 'javascript', 'ts': 'typescript', 'vue': 'html', 'jsx': 'javascript',
|
|
4476
|
+
'tsx': 'typescript', 'py': 'python', 'rb': 'ruby', 'java': 'java',
|
|
4477
|
+
'go': 'go', 'rs': 'rust', 'cpp': 'cpp', 'c': 'c', 'h': 'c',
|
|
4478
|
+
'css': 'css', 'scss': 'scss', 'html': 'html', 'json': 'json',
|
|
4479
|
+
'md': 'markdown', 'sh': 'bash', 'yml': 'yaml', 'yaml': 'yaml'
|
|
4480
|
+
};
|
|
4481
|
+
lang = langMap[ext] || 'plaintext';
|
|
4482
|
+
}
|
|
4483
|
+
// Extraire le code sans les numéros de ligne pour highlight.js
|
|
4484
|
+
let codeLines = [];
|
|
4485
|
+
for (const line of lines) {
|
|
4486
|
+
const match = line.match(/^\\s*\\d+[→|](.*)$/);
|
|
4487
|
+
if (match) {
|
|
4488
|
+
codeLines.push(match[1]);
|
|
4489
|
+
} else if (line.trim()) {
|
|
4490
|
+
codeLines.push(line);
|
|
4491
|
+
}
|
|
4492
|
+
}
|
|
4493
|
+
const codeContent = codeLines.join('\\n');
|
|
4494
|
+
const lineCount = codeLines.length;
|
|
4495
|
+
const preview = filename || (lineCount + ' lignes');
|
|
4496
|
+
|
|
4497
|
+
let html = '<details class="log-code-block">';
|
|
4498
|
+
html += '<summary class="log-code-header"><span class="code-lang">' + lang + '</span> ' + escapeHtml(preview) + '</summary>';
|
|
4499
|
+
html += '<pre><code class="language-' + lang + '">' + escapeHtml(codeContent) + '</code></pre>';
|
|
4500
|
+
html += '</details>';
|
|
4501
|
+
return html;
|
|
4502
|
+
}
|
|
4503
|
+
|
|
4504
|
+
function formatLogContent(rawContent) {
|
|
4505
|
+
if (!rawContent) return '';
|
|
4506
|
+
// Supprimer les balises <system-reminder> et leur contenu
|
|
4507
|
+
let cleanedContent = rawContent.replace(/<system-reminder>[\\s\\S]*?<\\/system-reminder>/gi, '');
|
|
4508
|
+
const lines = cleanedContent.split('\\n');
|
|
4509
|
+
const entries = [];
|
|
4510
|
+
let textBuffer = [];
|
|
4511
|
+
|
|
4512
|
+
function flushTextBuffer() {
|
|
4513
|
+
if (textBuffer.length > 0) {
|
|
4514
|
+
const text = textBuffer.join('\\n');
|
|
4515
|
+
entries.push('<div class="log-message-card"><div class="log-message-header assistant-header">Assistant</div><div class="log-message-body">' + renderMarkdown(text) + '</div></div>');
|
|
4516
|
+
textBuffer = [];
|
|
4517
|
+
}
|
|
4518
|
+
}
|
|
4519
|
+
|
|
4520
|
+
for (const line of lines) {
|
|
4521
|
+
// Garder les lignes vides dans le buffer pour les paragraphes markdown
|
|
4522
|
+
if (!line.trim()) {
|
|
4523
|
+
if (textBuffer.length > 0) textBuffer.push('');
|
|
4524
|
+
continue;
|
|
4525
|
+
}
|
|
4526
|
+
|
|
4527
|
+
const timestampMatch = line.match(/^\\[(\\d{4}-\\d{2}-\\d{2}T[^\\]]+)\\]\\s*(.*)$/);
|
|
4528
|
+
if (timestampMatch) {
|
|
4529
|
+
flushTextBuffer();
|
|
4530
|
+
const date = new Date(timestampMatch[1]);
|
|
4531
|
+
const timeStr = date.toLocaleTimeString();
|
|
4532
|
+
entries.push('<div class="log-entry timestamp">' + timeStr + ' - ' + escapeHtml(timestampMatch[2]) + '</div>');
|
|
4533
|
+
continue;
|
|
4534
|
+
}
|
|
4535
|
+
|
|
4536
|
+
if (line.startsWith('[RAW] ')) {
|
|
4537
|
+
flushTextBuffer();
|
|
4538
|
+
const raw = line.slice(6);
|
|
4539
|
+
if (!raw.startsWith('{')) continue;
|
|
4540
|
+
|
|
4541
|
+
if (raw.includes('"type":"tool_result"')) {
|
|
4542
|
+
const contentStart = raw.indexOf('"content":"');
|
|
4543
|
+
if (contentStart !== -1) {
|
|
4544
|
+
let content = raw.slice(contentStart + 11);
|
|
4545
|
+
const endQuote = content.lastIndexOf('"');
|
|
4546
|
+
if (endQuote > 0) content = content.slice(0, endQuote);
|
|
4547
|
+
const decoded = content.replace(/\\\\n/g, '\\n').replace(/\\\\"/g, '"').replace(/\\\\t/g, '\\t');
|
|
4548
|
+
if (/^\\s*\\d+[→|]/.test(decoded)) {
|
|
4549
|
+
entries.push('<div class="log-message-card"><div class="log-message-header result-header">Tool Result</div><div class="log-message-body">' + formatCodeBlock(decoded) + '</div></div>');
|
|
4550
|
+
} else {
|
|
4551
|
+
const lines = decoded.split('\\n').slice(0, 20);
|
|
4552
|
+
const truncated = decoded.split('\\n').length > 20 ? '<div style="color:#8b949e;font-style:italic">... (truncated)</div>' : '';
|
|
4553
|
+
entries.push('<div class="log-message-card"><div class="log-message-header result-header">Tool Result</div><div class="log-message-body" style="font-family:monospace;font-size:12px;white-space:pre-wrap;max-height:200px;overflow-y:auto">' + escapeHtml(lines.join('\\n')) + truncated + '</div></div>');
|
|
4554
|
+
}
|
|
4555
|
+
continue;
|
|
4556
|
+
}
|
|
4557
|
+
}
|
|
4558
|
+
|
|
4559
|
+
const textMatch = raw.match(/"type":"text","text":"([^"]+)"/);
|
|
4560
|
+
if (textMatch) {
|
|
4561
|
+
const decoded = textMatch[1].replace(/\\\\n/g, '\\n').replace(/\\\\"/g, '"');
|
|
4562
|
+
entries.push('<div class="log-message-card"><div class="log-message-header assistant-header">Assistant</div><div class="log-message-body">' + renderMarkdown(decoded) + '</div></div>');
|
|
4563
|
+
continue;
|
|
4564
|
+
}
|
|
4565
|
+
|
|
4566
|
+
const toolMatch = raw.match(/"type":"tool_use"[^}]*"name":"([^"]+)"/);
|
|
4567
|
+
if (toolMatch) {
|
|
4568
|
+
entries.push('<div class="log-entry tool-call"><span class="log-tool-badge">' + escapeHtml(toolMatch[1]) + '</span></div>');
|
|
4569
|
+
continue;
|
|
4570
|
+
}
|
|
4571
|
+
continue;
|
|
4572
|
+
}
|
|
4573
|
+
|
|
4574
|
+
if (line.startsWith('[SYSTEM]')) {
|
|
4575
|
+
flushTextBuffer();
|
|
4576
|
+
entries.push('<div class="log-entry system"><span class="log-label">System</span><div class="log-content">' + escapeHtml(line.slice(9)) + '</div></div>');
|
|
4577
|
+
continue;
|
|
4578
|
+
}
|
|
4579
|
+
if (line.startsWith('[ASSISTANT]')) {
|
|
4580
|
+
flushTextBuffer();
|
|
4581
|
+
entries.push('<div class="log-message-card"><div class="log-message-header assistant-header">Assistant</div><div class="log-message-body">' + renderMarkdown(line.slice(12)) + '</div></div>');
|
|
4582
|
+
continue;
|
|
4583
|
+
}
|
|
4584
|
+
if (line.startsWith('[TOOL]')) {
|
|
4585
|
+
flushTextBuffer();
|
|
4586
|
+
entries.push('<div class="log-entry tool-call"><span class="log-tool-badge">' + escapeHtml(line.slice(7)) + '</span></div>');
|
|
4587
|
+
continue;
|
|
4588
|
+
}
|
|
4589
|
+
if (line.startsWith('[RESULT]')) {
|
|
4590
|
+
flushTextBuffer();
|
|
4591
|
+
const content = line.slice(9);
|
|
4592
|
+
if (/^\\s*\\d+[→|]/.test(content)) {
|
|
4593
|
+
entries.push('<div class="log-message-card"><div class="log-message-header result-header">Result</div><div class="log-message-body">' + formatCodeBlock(content) + '</div></div>');
|
|
4594
|
+
} else {
|
|
4595
|
+
entries.push('<div class="log-message-card"><div class="log-message-header result-header">Result</div><div class="log-message-body">' + escapeHtml(content.slice(0, 1000)) + (content.length > 1000 ? '...' : '') + '</div></div>');
|
|
4596
|
+
}
|
|
4597
|
+
continue;
|
|
4598
|
+
}
|
|
4599
|
+
if (line.startsWith('[ERROR]')) {
|
|
4600
|
+
flushTextBuffer();
|
|
4601
|
+
entries.push('<div class="log-entry error"><span class="log-label">Error</span><div class="log-content">' + escapeHtml(line.slice(8)) + '</div></div>');
|
|
4602
|
+
continue;
|
|
4603
|
+
}
|
|
4604
|
+
|
|
4605
|
+
// Ligne de texte brut - ajouter au buffer pour regrouper
|
|
4606
|
+
textBuffer.push(line);
|
|
4607
|
+
}
|
|
4608
|
+
|
|
4609
|
+
// Flush le buffer restant
|
|
4610
|
+
flushTextBuffer();
|
|
4611
|
+
return entries.join('');
|
|
4612
|
+
}
|
|
4613
|
+
|
|
4614
|
+
async function fetchLog() {
|
|
4615
|
+
try {
|
|
4616
|
+
const res = await fetch('/api/tickets/' + TICKET_KEY + '/log/' + COLUMN_SLUG);
|
|
4617
|
+
const json = await res.json();
|
|
4618
|
+
const log = document.getElementById('terminal-log');
|
|
4619
|
+
const status = document.getElementById('terminal-status');
|
|
4620
|
+
|
|
4621
|
+
if (json.success && json.data && json.data.content) {
|
|
4622
|
+
log.innerHTML = formatLogContent(json.data.content);
|
|
4623
|
+
// Appliquer le syntax highlighting
|
|
4624
|
+
if (window.hljs) {
|
|
4625
|
+
log.querySelectorAll('pre code').forEach((block) => {
|
|
4626
|
+
hljs.highlightElement(block);
|
|
4627
|
+
});
|
|
4628
|
+
}
|
|
4629
|
+
log.scrollTop = log.scrollHeight;
|
|
4630
|
+
status.className = 'terminal-status success';
|
|
4631
|
+
status.textContent = 'Terminé';
|
|
4632
|
+
} else {
|
|
4633
|
+
log.innerHTML = '<div class="no-log">Aucun log disponible pour cette colonne.</div>';
|
|
4634
|
+
status.className = 'terminal-status idle';
|
|
4635
|
+
status.textContent = 'Aucun log';
|
|
4636
|
+
}
|
|
4637
|
+
} catch (e) {
|
|
4638
|
+
console.error('Log fetch error:', e);
|
|
4639
|
+
document.getElementById('terminal-log').innerHTML = '<div class="no-log">Erreur de chargement.</div>';
|
|
4640
|
+
}
|
|
4641
|
+
}
|
|
4642
|
+
|
|
4643
|
+
// WebSocket for live updates
|
|
4644
|
+
let ws = null;
|
|
4645
|
+
function connectWebSocket() {
|
|
4646
|
+
const protocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
|
|
4647
|
+
ws = new WebSocket(protocol + '//' + location.host + '/ws');
|
|
4648
|
+
|
|
4649
|
+
ws.onmessage = (event) => {
|
|
4650
|
+
try {
|
|
4651
|
+
const msg = JSON.parse(event.data);
|
|
4652
|
+
if (msg.type === 'claude:start' && msg.ticketKey === TICKET_KEY) {
|
|
4653
|
+
document.getElementById('terminal-status').className = 'terminal-status processing';
|
|
4654
|
+
document.getElementById('terminal-status').textContent = 'En cours...';
|
|
4655
|
+
}
|
|
4656
|
+
if (msg.type === 'claude:end' && msg.ticketKey === TICKET_KEY) {
|
|
4657
|
+
fetchLog();
|
|
4658
|
+
}
|
|
4659
|
+
if (msg.type === 'ticket:updated' && msg.ticketKey === TICKET_KEY) {
|
|
4660
|
+
fetchLog();
|
|
4661
|
+
}
|
|
4662
|
+
} catch (e) {
|
|
4663
|
+
console.error('WebSocket error:', e);
|
|
4664
|
+
}
|
|
4665
|
+
};
|
|
4666
|
+
|
|
4667
|
+
ws.onclose = () => {
|
|
4668
|
+
setTimeout(connectWebSocket, 3000);
|
|
4669
|
+
};
|
|
4670
|
+
}
|
|
4671
|
+
|
|
4672
|
+
// Init
|
|
4673
|
+
fetchLog();
|
|
4674
|
+
connectWebSocket();
|
|
4675
|
+
</script>
|
|
4676
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
|
|
4677
|
+
</body>
|
|
4678
|
+
</html>`;
|
|
4679
|
+
}
|
|
4680
|
+
/**
|
|
4681
|
+
* Generate the column prompt page HTML
|
|
4682
|
+
*/
|
|
4683
|
+
export function generateColumnPromptPage(ticketKey, columnSlug, lang) {
|
|
4684
|
+
const config = getConfig();
|
|
4685
|
+
const ticket = getTicket(config.root, ticketKey);
|
|
4686
|
+
// 404 page if ticket not found
|
|
4687
|
+
if (!ticket) {
|
|
4688
|
+
return `<!DOCTYPE html>
|
|
4689
|
+
<html lang="${lang}">
|
|
4690
|
+
<head>
|
|
4691
|
+
<meta charset="UTF-8">
|
|
4692
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
4693
|
+
<title>Ticket Not Found - AutoCode</title>
|
|
4694
|
+
<style>
|
|
4695
|
+
:root {
|
|
4696
|
+
--bg: #0a0a0f;
|
|
4697
|
+
--text: #f1f5f9;
|
|
4698
|
+
--accent: #6366f1;
|
|
4699
|
+
}
|
|
4700
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
4701
|
+
body {
|
|
4702
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
4703
|
+
background: var(--bg);
|
|
4704
|
+
color: var(--text);
|
|
4705
|
+
min-height: 100vh;
|
|
4706
|
+
display: flex;
|
|
4707
|
+
align-items: center;
|
|
4708
|
+
justify-content: center;
|
|
4709
|
+
}
|
|
4710
|
+
.not-found {
|
|
4711
|
+
text-align: center;
|
|
4712
|
+
padding: 48px;
|
|
4713
|
+
}
|
|
4714
|
+
h1 { font-size: 2rem; margin-bottom: 16px; }
|
|
4715
|
+
p { color: #94a3b8; margin-bottom: 24px; }
|
|
4716
|
+
a {
|
|
4717
|
+
display: inline-block;
|
|
4718
|
+
background: var(--accent);
|
|
4719
|
+
color: white;
|
|
4720
|
+
padding: 12px 24px;
|
|
4721
|
+
border-radius: 8px;
|
|
4722
|
+
text-decoration: none;
|
|
4723
|
+
font-weight: 500;
|
|
4724
|
+
}
|
|
4725
|
+
a:hover { opacity: 0.9; }
|
|
4726
|
+
</style>
|
|
4727
|
+
</head>
|
|
4728
|
+
<body>
|
|
4729
|
+
<div class="not-found">
|
|
4730
|
+
<h1>Ticket Not Found</h1>
|
|
4731
|
+
<p>Ticket ${escapeHtml(ticketKey)} does not exist or has been archived.</p>
|
|
4732
|
+
<a href="/">← Back to Dashboard</a>
|
|
4733
|
+
</div>
|
|
4734
|
+
</body>
|
|
4735
|
+
</html>`;
|
|
4736
|
+
}
|
|
4737
|
+
return `<!DOCTYPE html>
|
|
4738
|
+
<html lang="${lang}">
|
|
4739
|
+
<head>
|
|
4740
|
+
<meta charset="UTF-8">
|
|
4741
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
4742
|
+
<title>Prompt → ${escapeHtml(columnSlug)} | ${ticketKey} - AutoCode</title>
|
|
4743
|
+
<style>
|
|
4744
|
+
:root {
|
|
4745
|
+
--bg: #0a0a0f;
|
|
4746
|
+
--bg-secondary: #12121a;
|
|
4747
|
+
--bg-tertiary: #1a1a24;
|
|
4748
|
+
--text: #f1f5f9;
|
|
4749
|
+
--muted: #94a3b8;
|
|
4750
|
+
--border: #2a2a3a;
|
|
4751
|
+
--accent: #6366f1;
|
|
4752
|
+
--blue: #4dabf7;
|
|
4753
|
+
--green: #4ade80;
|
|
4754
|
+
--yellow: #facc15;
|
|
4755
|
+
--orange: #fb923c;
|
|
4756
|
+
--red: #f87171;
|
|
4757
|
+
--purple: #a78bfa;
|
|
4758
|
+
}
|
|
4759
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
4760
|
+
body {
|
|
4761
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
4762
|
+
background: var(--bg);
|
|
4763
|
+
color: var(--text);
|
|
4764
|
+
min-height: 100vh;
|
|
4765
|
+
display: flex;
|
|
4766
|
+
flex-direction: column;
|
|
4767
|
+
}
|
|
4768
|
+
.header {
|
|
4769
|
+
display: flex;
|
|
4770
|
+
align-items: center;
|
|
4771
|
+
gap: 24px;
|
|
4772
|
+
padding: 16px 24px;
|
|
4773
|
+
background: var(--bg-secondary);
|
|
4774
|
+
border-bottom: 1px solid var(--border);
|
|
4775
|
+
position: sticky;
|
|
4776
|
+
top: 0;
|
|
4777
|
+
z-index: 100;
|
|
4778
|
+
}
|
|
4779
|
+
.back-btn {
|
|
4780
|
+
color: var(--muted);
|
|
4781
|
+
text-decoration: none;
|
|
4782
|
+
font-size: 14px;
|
|
4783
|
+
display: flex;
|
|
4784
|
+
align-items: center;
|
|
4785
|
+
gap: 8px;
|
|
4786
|
+
padding: 8px 16px;
|
|
4787
|
+
background: var(--bg-tertiary);
|
|
4788
|
+
border-radius: 6px;
|
|
4789
|
+
transition: all 0.2s;
|
|
4790
|
+
}
|
|
4791
|
+
.back-btn:hover { color: var(--text); background: var(--border); }
|
|
4792
|
+
.ticket-key {
|
|
4793
|
+
font-family: 'SF Mono', Monaco, monospace;
|
|
4794
|
+
font-size: 12px;
|
|
4795
|
+
color: var(--accent);
|
|
4796
|
+
background: rgba(99, 102, 241, 0.15);
|
|
4797
|
+
padding: 4px 10px;
|
|
4798
|
+
border-radius: 4px;
|
|
4799
|
+
font-weight: 600;
|
|
4800
|
+
}
|
|
4801
|
+
.column-slug {
|
|
4802
|
+
font-family: 'SF Mono', Monaco, monospace;
|
|
4803
|
+
font-size: 14px;
|
|
4804
|
+
color: var(--yellow);
|
|
4805
|
+
background: rgba(250, 204, 21, 0.15);
|
|
4806
|
+
padding: 6px 12px;
|
|
4807
|
+
border-radius: 4px;
|
|
4808
|
+
font-weight: 500;
|
|
4809
|
+
}
|
|
4810
|
+
.page-title {
|
|
4811
|
+
flex: 1;
|
|
4812
|
+
font-size: 18px;
|
|
4813
|
+
font-weight: 600;
|
|
4814
|
+
display: flex;
|
|
4815
|
+
align-items: center;
|
|
4816
|
+
gap: 12px;
|
|
4817
|
+
}
|
|
4818
|
+
.main {
|
|
4819
|
+
flex: 1;
|
|
4820
|
+
padding: 24px;
|
|
4821
|
+
display: flex;
|
|
4822
|
+
flex-direction: column;
|
|
4823
|
+
}
|
|
4824
|
+
.prompt-container {
|
|
4825
|
+
flex: 1;
|
|
4826
|
+
background: var(--bg-secondary);
|
|
4827
|
+
border: 1px solid var(--border);
|
|
4828
|
+
border-radius: 12px;
|
|
4829
|
+
display: flex;
|
|
4830
|
+
flex-direction: column;
|
|
4831
|
+
overflow: hidden;
|
|
4832
|
+
}
|
|
4833
|
+
.prompt-header {
|
|
4834
|
+
display: flex;
|
|
4835
|
+
align-items: center;
|
|
4836
|
+
gap: 12px;
|
|
4837
|
+
padding: 12px 16px;
|
|
4838
|
+
background: var(--bg-tertiary);
|
|
4839
|
+
border-bottom: 1px solid var(--border);
|
|
4840
|
+
}
|
|
4841
|
+
.prompt-status {
|
|
4842
|
+
font-size: 12px;
|
|
4843
|
+
padding: 4px 12px;
|
|
4844
|
+
border-radius: 12px;
|
|
4845
|
+
font-weight: 500;
|
|
4846
|
+
}
|
|
4847
|
+
.prompt-status.loaded { background: rgba(74, 222, 128, 0.15); color: var(--green); }
|
|
4848
|
+
.prompt-status.loading { background: rgba(251, 146, 60, 0.15); color: var(--orange); }
|
|
4849
|
+
.prompt-status.error { background: rgba(248, 113, 113, 0.15); color: var(--red); }
|
|
4850
|
+
.prompt-content {
|
|
4851
|
+
flex: 1;
|
|
4852
|
+
padding: 24px;
|
|
4853
|
+
overflow-y: auto;
|
|
4854
|
+
font-size: 14px;
|
|
4855
|
+
line-height: 1.6;
|
|
4856
|
+
word-break: break-word;
|
|
4857
|
+
}
|
|
4858
|
+
.no-prompt {
|
|
4859
|
+
color: var(--muted);
|
|
4860
|
+
text-align: center;
|
|
4861
|
+
padding: 48px;
|
|
4862
|
+
font-size: 14px;
|
|
4863
|
+
}
|
|
4864
|
+
/* Markdown styles */
|
|
4865
|
+
.prompt-content h1 { font-size: 1.8em; font-weight: 600; margin: 1em 0 0.5em 0; color: var(--text); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
|
|
4866
|
+
.prompt-content h2 { font-size: 1.5em; font-weight: 600; margin: 1em 0 0.5em 0; color: var(--text); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
|
|
4867
|
+
.prompt-content h3 { font-size: 1.25em; font-weight: 600; margin: 1em 0 0.5em 0; color: var(--text); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
|
|
4868
|
+
.prompt-content h4, .prompt-content h5, .prompt-content h6 { font-size: 1.1em; font-weight: 600; margin: 1em 0 0.5em 0; color: var(--text); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
|
|
4869
|
+
.prompt-content p { margin: 0.8em 0; }
|
|
4870
|
+
.prompt-content ul, .prompt-content ol { margin: 0.8em 0; padding-left: 2em; }
|
|
4871
|
+
.prompt-content li { margin: 0.3em 0; }
|
|
4872
|
+
.prompt-content code { background: var(--bg-tertiary); padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }
|
|
4873
|
+
.prompt-content pre { background: var(--bg-tertiary); padding: 16px; border-radius: 8px; overflow-x: auto; margin: 1em 0; }
|
|
4874
|
+
.prompt-content pre code { background: none; padding: 0; }
|
|
4875
|
+
.prompt-content blockquote { border-left: 3px solid var(--accent); padding-left: 16px; margin: 1em 0; color: var(--muted); font-style: italic; }
|
|
4876
|
+
.prompt-content a { color: var(--blue); text-decoration: none; }
|
|
4877
|
+
.prompt-content a:hover { text-decoration: underline; }
|
|
4878
|
+
.prompt-content hr { border: none; border-top: 1px solid var(--border); margin: 1.5em 0; }
|
|
4879
|
+
.prompt-content table { border-collapse: collapse; width: 100%; margin: 1em 0; }
|
|
4880
|
+
.prompt-content th, .prompt-content td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
|
|
4881
|
+
.prompt-content th { background: var(--bg-tertiary); }
|
|
4882
|
+
.prompt-content strong { font-weight: 600; }
|
|
4883
|
+
.prompt-content em { font-style: italic; }
|
|
4884
|
+
</style>
|
|
4885
|
+
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
|
4886
|
+
</head>
|
|
4887
|
+
<body>
|
|
4888
|
+
<header class="header">
|
|
4889
|
+
<a href="/ticket/${ticketKey}" class="back-btn">← Retour</a>
|
|
4890
|
+
<span class="ticket-key">${ticketKey}</span>
|
|
4891
|
+
<div class="page-title">
|
|
4892
|
+
<span>Prompt →</span>
|
|
4893
|
+
<span class="column-slug">${escapeHtml(columnSlug)}</span>
|
|
4894
|
+
</div>
|
|
4895
|
+
</header>
|
|
4896
|
+
|
|
4897
|
+
<main class="main">
|
|
4898
|
+
<div class="prompt-container">
|
|
4899
|
+
<div class="prompt-header">
|
|
4900
|
+
<span class="prompt-status loading" id="prompt-status">Chargement...</span>
|
|
4901
|
+
</div>
|
|
4902
|
+
<div class="prompt-content" id="prompt-content">
|
|
4903
|
+
<div class="no-prompt">Chargement du prompt...</div>
|
|
4904
|
+
</div>
|
|
4905
|
+
</div>
|
|
4906
|
+
</main>
|
|
4907
|
+
|
|
4908
|
+
<script>
|
|
4909
|
+
const TICKET_KEY = '${ticketKey}';
|
|
4910
|
+
const COLUMN_SLUG = '${escapeHtml(columnSlug)}';
|
|
4911
|
+
|
|
4912
|
+
function escapeHtml(str) {
|
|
4913
|
+
if (typeof str !== 'string') return '';
|
|
4914
|
+
return str.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
|
|
4915
|
+
}
|
|
4916
|
+
|
|
4917
|
+
async function fetchPrompt() {
|
|
4918
|
+
const content = document.getElementById('prompt-content');
|
|
4919
|
+
const status = document.getElementById('prompt-status');
|
|
4920
|
+
|
|
4921
|
+
try {
|
|
4922
|
+
const res = await fetch('/api/tickets/' + TICKET_KEY + '/prompt/' + COLUMN_SLUG);
|
|
4923
|
+
const json = await res.json();
|
|
4924
|
+
|
|
4925
|
+
if (json.success && json.data && json.data.prompt) {
|
|
4926
|
+
content.innerHTML = marked.parse(json.data.prompt);
|
|
4927
|
+
status.className = 'prompt-status loaded';
|
|
4928
|
+
status.textContent = 'Chargé';
|
|
4929
|
+
} else {
|
|
4930
|
+
content.innerHTML = '<div class="no-prompt">Aucun prompt disponible pour cette colonne.</div>';
|
|
4931
|
+
status.className = 'prompt-status error';
|
|
4932
|
+
status.textContent = 'Non disponible';
|
|
4933
|
+
}
|
|
4934
|
+
} catch (e) {
|
|
4935
|
+
console.error('Prompt fetch error:', e);
|
|
4936
|
+
content.innerHTML = '<div class="no-prompt">Erreur de chargement.</div>';
|
|
4937
|
+
status.className = 'prompt-status error';
|
|
4938
|
+
status.textContent = 'Erreur';
|
|
4939
|
+
}
|
|
4940
|
+
}
|
|
4941
|
+
|
|
4942
|
+
// Init
|
|
4943
|
+
fetchPrompt();
|
|
4944
|
+
</script>
|
|
4945
|
+
</body>
|
|
4946
|
+
</html>`;
|
|
4947
|
+
}
|
|
4041
4948
|
//# sourceMappingURL=dashboard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../../src/server/dashboard.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/C,MAAM,GAAG,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAE1C;;GAEG;AACH,MAAM,UAAU,iBAAiB;IAC/B,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,OAAO,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACzC,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,MAAM,OAAO,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAE5C,yCAAyC;IACzC,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CA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;;;;;;;;;;;;;;;;;;;QAkOzC,CAAC;AACT,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,wBAAwB,CAAC,SAAiB,EAAE,UAAkB,EAAE,IAAY;IAC1F,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAEjD,+BAA+B;IAC/B,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO;cACG,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBA0CF,UAAU,CAAC,SAAS,CAAC;;;;QAI7B,CAAC;IACP,CAAC;IAED,OAAO;cACK,IAAI;;;;oBAIE,UAAU,CAAC,UAAU,CAAC,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAmJlC,SAAS;+BACD,SAAS;;;kCAGN,UAAU,CAAC,UAAU,CAAC;;;;;;;;;;;;;;;;0BAgB9B,SAAS;2BACR,UAAU,CAAC,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAoCzC,CAAC;AACT,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAYH;;GAEG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAYH;;GAEG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAqI7D"}
|
package/dist/server/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* HTTP Server
|
|
3
3
|
*/
|
|
4
4
|
import { createServer } from 'node:http';
|
|
5
|
-
import { generateDashboard, generateColumnEditPage, generateTicketViewPage } from './dashboard.js';
|
|
5
|
+
import { generateDashboard, generateColumnEditPage, generateTicketViewPage, generateColumnTerminalPage, generateColumnPromptPage } from './dashboard.js';
|
|
6
6
|
import { handleApiRequest } from './api.js';
|
|
7
7
|
import { handleWebSocketUpgrade, setupPingInterval, getClientCount } from './websocket.js';
|
|
8
8
|
import { startWatcher, stopWatcher } from './watcher.js';
|
|
@@ -48,6 +48,28 @@ export async function startServer(port) {
|
|
|
48
48
|
res.end(html);
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
51
|
+
// Handle column terminal page
|
|
52
|
+
const ticketTerminalMatch = url.match(/^\/ticket\/(AC-\d{6})\/([^/]+)\/terminal$/);
|
|
53
|
+
if (ticketTerminalMatch) {
|
|
54
|
+
const config = getConfig();
|
|
55
|
+
const ticketKey = ticketTerminalMatch[1];
|
|
56
|
+
const columnSlug = ticketTerminalMatch[2];
|
|
57
|
+
const html = generateColumnTerminalPage(ticketKey, columnSlug, config.lang);
|
|
58
|
+
res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8' });
|
|
59
|
+
res.end(html);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
// Handle column prompt page
|
|
63
|
+
const ticketPromptMatch = url.match(/^\/ticket\/(AC-\d{6})\/([^/]+)\/prompt$/);
|
|
64
|
+
if (ticketPromptMatch) {
|
|
65
|
+
const config = getConfig();
|
|
66
|
+
const ticketKey = ticketPromptMatch[1];
|
|
67
|
+
const columnSlug = ticketPromptMatch[2];
|
|
68
|
+
const html = generateColumnPromptPage(ticketKey, columnSlug, config.lang);
|
|
69
|
+
res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8' });
|
|
70
|
+
res.end(html);
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
51
73
|
// Health check
|
|
52
74
|
if (url === '/health') {
|
|
53
75
|
res.writeHead(200, { 'Content-Type': 'application/json' });
|
package/dist/server/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAmC,MAAM,WAAW,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAmC,MAAM,WAAW,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AACzJ,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3F,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,IAAY;IAC5C,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,EAAE,GAAoB,EAAE,GAAmB,EAAE,EAAE;QAC9E,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC;QA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