Release 2.10.0: 코드 에디터 터미널 초기화 버그 수정 + cls/clear 자동 실행

- requestAnimationFrame → setTimeout(60ms): 패널 레이아웃 계산 후 xterm 초기화
- ptyReady 스냅샷 버그 수정: codeTermShells 대신 xtermInstances 참조
- 터미널 열릴 때 cls/clear 자동 실행 (Windows: cls, Linux: clear)
- companionPlatform 타이밍 버그 수정: clearCmd를 shell_ready 수신 후 평가

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
kim
2026-06-10 10:23:19 +09:00
co-authored by Claude Sonnet 4.6
parent 9b558be9f4
commit 158a156746
7 changed files with 296 additions and 1098 deletions
+3 -20
View File
@@ -58,16 +58,6 @@
:root:not([data-theme="dark"]) .csb-model-dot { background: var(--brand); box-shadow: 0 0 5px var(--brand); }
:root:not([data-theme="dark"]) .csb-model-select-wrap::after { color: var(--brand); }
:root:not([data-theme="dark"]) .csb-model-select-wrap select { color: var(--text); }
/* 프로젝트 카드 */
:root:not([data-theme="dark"]) .csb-project-card {
background: var(--panel); border-color: var(--line);
}
:root:not([data-theme="dark"]) .csb-project-card:focus-within {
border-color: var(--brand); box-shadow: 0 0 0 2px rgba(22,104,227,.1);
}
:root:not([data-theme="dark"]) .csb-project-label { color: var(--brand); }
:root:not([data-theme="dark"]) .csb-project-select-wrap::after { color: var(--brand); }
:root:not([data-theme="dark"]) .csb-project-select-wrap select { color: var(--text); }
/* 새 세션 버튼 */
:root:not([data-theme="dark"]) .csb-new-session-btn {
background: var(--panel); border-color: var(--line); color: var(--muted);
@@ -242,12 +232,6 @@
<div style="flex-shrink:0;display:flex;flex-direction:column;overflow:hidden;border-top:1px solid var(--line)">
<!-- 모델 선택 -->
<div style="display:flex;flex-direction:column;flex:1;overflow-y:auto;padding:10px 12px;gap:8px">
<div id="csb-session-project-row" class="csb-project-card" style="display:none">
<div class="csb-project-label">📁 프로젝트</div>
<div class="csb-project-select-wrap">
<select id="csb-session-project-sel" onchange="switchProject(this.value||null)"></select>
</div>
</div>
<button onclick="codeAiClear()" class="csb-new-session-btn">↺ 새 세션</button>
<!-- 실행 + AI 전송 -->
<div style="display:flex;gap:6px;margin-top:2px">
@@ -280,10 +264,11 @@
<div style="font-size:10px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.05em;margin-bottom:6px">터미널 시작 경로</div>
<div style="display:flex;align-items:center;gap:6px">
<input type="text" id="csb-termpath" placeholder="/home/kim/projects/mygame"
style="flex:1;font-size:12px;padding:6px 8px;background:var(--panel-2);color:var(--text);border:1px solid var(--line);border-radius:8px;font-family:'IBM Plex Mono',monospace">
style="flex:1;font-size:12px;padding:6px 8px;background:var(--panel-2);color:var(--text);border:1px solid var(--line);border-radius:8px;font-family:'IBM Plex Mono',monospace"
onkeydown="if(event.key==='Enter')csbTermPathSave()">
<button onclick="csbTermPathSave()" style="background:var(--brand);color:#fff;border:none;border-radius:8px;padding:6px 10px;font-size:11px;font-weight:700;cursor:pointer;white-space:nowrap">저장</button>
</div>
<div style="font-size:10px;color:var(--muted);margin-top:4px">새 터미널 탭 열면 이 경로로 자동 이동</div>
<div id="csb-termpath-status" style="font-size:10px;color:var(--muted);margin-top:4px">새 터미널 탭 열면 이 경로로 자동 이동</div>
</div>
<div>
<div style="font-size:10px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.05em;margin-bottom:6px">에디터 폰트</div>
@@ -398,8 +383,6 @@
</div>
</div>
<div class="code-ai-input-row">
<button id="code-ai-mode-btn" onclick="toggleCodeAiMode()" title="Ask: 질문/설명 | Code: 파일 편집"
style="flex-shrink:0;align-self:flex-end;background:none;border:1px solid #2a3a5a;border-radius:4px;padding:4px 8px;font-size:11px;cursor:pointer;color:#7aabf0;white-space:nowrap;line-height:1.4">✏️ Code</button>
<textarea id="code-ai-input" placeholder="AI에게 질문..." rows="1"
oninput="this.style.height='auto';this.style.height=Math.min(this.scrollHeight,200)+'px'"
onkeydown="if(event.key==='Enter'&&!event.shiftKey){event.preventDefault();codeAiSend();}"></textarea>
+137 -890
View File
File diff suppressed because it is too large Load Diff
+27 -59
View File
@@ -2494,11 +2494,29 @@
background: #0a1a10; border-radius: 8px;
padding: 5px 10px; max-width: 72%;
border: 1px solid #1a3a22;
animation: thinking-fade 1.8s ease-in-out infinite;
display: flex; align-items: center; gap: 7px;
}
@keyframes thinking-fade {
0%, 100% { opacity: .7; }
50% { opacity: 1; }
.code-ai-msg.thinking::before {
content: '';
display: inline-block; flex-shrink: 0;
width: 7px; height: 7px; border-radius: 50%;
background: #4ade80;
animation: thinking-pulse 1s ease-in-out infinite;
}
@keyframes thinking-pulse {
0%, 100% { opacity: 0.25; transform: scale(0.7); }
50% { opacity: 1; transform: scale(1.2); }
}
.code-ai-msg.thinking::after {
content: '···';
letter-spacing: 0.1em;
animation: thinking-dots 1.4s steps(4, end) infinite;
}
@keyframes thinking-dots {
0% { opacity: 0.1; }
33% { opacity: 0.5; }
66% { opacity: 0.9; }
100% { opacity: 0.1; }
}
.code-ai-msg.system {
color: #4b7a5e; font-size: 11px; text-align: center;
@@ -2521,18 +2539,18 @@
gap: 6px;
padding: 4px 10px;
margin: 3px 0;
border-left: 3px solid var(--brand, #7c3aed);
border-left: 3px solid #22c55e;
border-radius: 4px;
background: var(--panel-2, #1e1e2e);
background: #0d1f16;
font-size: 11px;
font-family: 'IBM Plex Mono', monospace;
transition: background 0.15s;
}
.code-ai-tool-icon { font-size: 13px; flex-shrink: 0; }
.code-ai-tool-name { font-weight: 600; color: var(--text, #e2e8f0); }
.code-ai-tool-name { font-weight: 600; color: #c8e6c0; }
.code-ai-tool-result {
font-size: 11px;
color: var(--muted, #94a3b8);
color: #6b9e82;
margin-left: 4px;
white-space: nowrap;
overflow: hidden;
@@ -2660,57 +2678,7 @@
background: #1a2a1a;
color: #d4ffd4;
}
.csb-project-card {
background: linear-gradient(135deg, #0d1a2a 0%, #111a20 100%);
border: 1px solid #1a3a5c;
border-radius: 10px;
padding: 8px 10px;
display: flex;
flex-direction: column;
gap: 5px;
transition: border-color .2s;
}
.csb-project-card:focus-within {
border-color: #60a5fa;
box-shadow: 0 0 0 2px rgba(96,165,250,.15);
}
.csb-project-label {
display: flex;
align-items: center;
gap: 5px;
font-size: 10px;
font-weight: 700;
color: #60a5fa;
text-transform: uppercase;
letter-spacing: .06em;
}
.csb-project-select-wrap {
position: relative;
display: flex;
align-items: center;
}
.csb-project-select-wrap::after {
content: '▾';
position: absolute;
right: 8px;
font-size: 10px;
color: #60a5fa;
pointer-events: none;
}
.csb-project-select-wrap select {
width: 100%;
appearance: none;
-webkit-appearance: none;
background: transparent;
border: none;
outline: none;
font-size: 12px;
font-family: 'IBM Plex Mono', monospace;
font-weight: 600;
color: #e8f0fe;
cursor: pointer;
padding-right: 20px;
}
.csb-new-session-btn {
width: 100%;
padding: 8px;