Commit Graph
30 Commits
Author SHA1 Message Date
kimandClaude Sonnet 4.6 267441d633 feat: 보드 선택에 언어 옵션 추가 + 아두이노 힌트 범용화
- 보드 드롭다운 상단에 Python / C++(일반) / 기타 언어 옵션 추가
- _boardSpecificHints 리팩터: 모든 하드웨어 보드에 Arduino C++ 기본 규칙 적용
- arch별 추가 규칙 (esp32/esp8266/stm32/avr) 유지
- STM32 힌트 "Python 절대 사용 금지" → "PC 앱 필요 시 병행 가능"으로 완화

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-30 17:50:12 +09:00
kimandClaude Sonnet 4.6 1eb4674303 fix: 코드 AI 시스템 프롬프트 — 보드/파일 컨텍스트 강화
- 보드 블록을 프롬프트 앞으로 이동, 로컬 폴더와 분리
- 에디터 열린 파일 목록을 별도 섹션으로 강조
- 로컬 폴더는 '파일 저장소'로만 표현 (프로젝트 탐색 대상 아님)
- AI가 Glob/list로 로컬 폴더를 탐색해 프로젝트 파악하는 행동 방지

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-30 17:06:15 +09:00
kimandClaude Sonnet 4.6 b5155a153b fix: 코드 AI에 STM32 보드 컨텍스트 항상 포함
- _boardSpecificHints에 stm32 케이스 추가 (C++/Arduino 명시, Python 금지)
- boardBlock: hints 유무 관계없이 보드명+FQBN 항상 시스템 프롬프트에 포함

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-30 16:54:22 +09:00
kimandClaude Sonnet 4.6 e520d09ca1 feat: STM32 Blue Pill 에뮬레이터 UI — 보드 SVG + GPIO LED 시각화
- Blue Pill SVG: 핀 서클(r=3), 폰트 4px bold, 온보드 LED/PWR/RST 버튼 확대
- GPIO 텔레메트리: _RN_PNAME()+Serial.write(STX/ETX)로 digitalWrite() 후 핀 상태 전송
- PA0 등 아날로그 핀 번호(0xC0=192) → digitalPinToPinName()으로 런타임 복원
- PC13 toggle 시 핀 서클 + 온보드 LED 동시 업데이트 (active LOW)
- PA9(TX)/PA10(RX) 시리얼 신호 깜빡임
- 코드 에디터 AI에 선택된 보드 이름(boardContext) 전달

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 22:07:06 +09:00
kimandClaude Sonnet 4.6 c13fa4fae5 feat: STM32 Renode 에뮬레이터 작동 — HAL 폴링 루프 + 비트밴드 + 타이밍 수정
- stm32f103_fixed.repl: Miscellaneous.BitBanding 추가로 HAL bit-band
  RCC 접근(0x42xxxxxx) 정상 처리, SRAM 크기 20KB로 수정,
  systickFrequency 8MHz로 낮춰 실시간 타이밍 보정
- stm32f1_rcc.py(~/.local): UTF-8 인코딩 선언, PLLRDY가 PLLON을
  동적으로 추적해 SystemClock_Config() HAL 폴링 루프 해소
- routes-arduino.ts: SystemClock_Config() 스케치에서 제거(bit-band
  우회), 보드 선택 6종 whitelist, Companion WS 재연결 스팸 수정
- arduino-emulator.html + code.js: Renode 세션 라우팅 + 보라 배지

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 21:10:50 +09:00
kimandClaude Sonnet 4.6 23831f79ba v3.0.5: RP2040 브라우저 에뮬레이터 — rp2040js 기반 전체 구현
- RP2040(Pico) 보드 감지·컴파일·에뮬레이션 지원 추가
  - Serial → Serial1(UART0) 자동 리다이렉트 (#define 삽입)
  - .uf2 파일 우선 추출, bootrom 자동 다운로드·캐싱
  - ELF .text 추출: arm-none-eabi-objcopy 대신 Node.js 내장 파서
  - HTTP 302 리다이렉트 자동 팔로우 (_httpsGetFollow)
- rp2040js 에뮬레이터: fast-path 초기화 루프, 피코 SVG 보드, GPIO25 LED
- 예외 처리: HardFault(#3)만 중지, 나머지 IRQ/SysTick 정상 통과
- UART onByte: TextDecoder stream 모드로 한글 UTF-8 정상 출력
- heartbeat 메시지 제거
- WiFi scan mock: WSCN 프로토콜로 C++ ↔ 브라우저 동기화, UI 편집 지원
- 에뮬레이터 팝업 → 코드 에디터 인라인 iframe 패널로 전환
- CDN 의존성 → /vendor/ 로컬 서빙 (xterm, Monaco)
- SSE 세션 idle timer (창 닫힘 후 5분 자동 종료)
- 업로드: 속도 자동 재시도(921600→460800→230400) + FlashMode fallback

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-19 13:37:56 +09:00
kimandClaude Sonnet 4.6 5a7c38b26d v3.0.4: 업로드 패널 컴파일 캐시 — 컴파일 후 업로드 시 재컴파일 생략
- 컴파일 결과를 (code, fqbn) 키로 캐시
- 사이드바 🔨 컴파일 성공 시에도 캐시 저장
- 캐시 히트 시 업로드/다운로드에서 컴파일 단계 건너뜀

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-19 00:04:06 +09:00
kimandClaude Sonnet 4.6 4caa35aac2 v3.0.3: 아두이노 업로더 통합 — 팝업 제거, 코드 에디터 하단 패널로 이전
- arduino-upload.html 삭제, 모든 로직을 code.js로 이식
- ⚡ 업로드 버튼 → 인라인 패널 오픈 (팝업·sessionStorage 릴레이 제거)
- OUTPUT / 옵션 / 시리얼 탭, 드래그 리사이즈, ESP32·AVR·STM32 업로드
- server-v2.ts 중복 /api/settings/paths 라우트 제거 (설정 저장 오류 수정)
- 업로드 패널 색상·폰트 개선 (배경 밝게, 12~13px)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-18 23:59:46 +09:00
kimandClaude Sonnet 4.6 a994ac1b73 v3.0.2: server-v2 모듈 분리 — Arduino·PPTX 라우트 추출 (-2923줄)
- routes-arduino.ts: Arduino 컴파일/라이브러리/QEMU/ESP8266 에뮬 전체
- routes-pptx.ts: PPTX 생성/편집/PDF/이미지 API 전체
- mocks-esp32: WiFi.STA(_STAProxy), scanNetworks, DELETE() 수정
- mocks-esp8266: DELETE() 수정
- server-v2.ts: 16106 → 13183줄 (–18%)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-16 21:00:40 +09:00
kimandClaude Sonnet 4.6 18b9d5ba74 v3.0.1: 에뮬레이터 업그레이드 — 정지/재시작, UTF-8 시리얼, CodeMirror, 속도슬라이더
코드 에디터 (code.html / code.js)
- xterm → @xterm/xterm 5.5.0 마이그레이션 (UMD 전역명 AddonFit/AddonWebLinks)
- Monaco Editor 0.52.0 업그레이드
- AI 패널 CSS 변수 (--ai-hdr-bg 등) 다크/라이트 테마 분리
- Arduino/GCC/Python/JS 오류 패턴(_ERROR_PATTERNS) 확장

Arduino 에뮬레이터 (arduino-emulator.html)
- CodeMirror 5 스케치 에디터 내장 (C++ 구문 강조, BroadcastChannel 동기화)
- 속도 select → range 슬라이더 (1x~최대, 로그 스케일)
- 시리얼 UTF-8: 수동 바이트버퍼 → 스트리밍 TextDecoder({ stream:true })로 교체 (°C 깨짐 수정)
- 정지/시작 토글 버튼 추가 (AVR: togglePower, ESP32/ESP8266: pause↔restart)
- 회로→코드 버튼 (🤖) 추가
- 보드 타이틀 FQBN 기반 동적 설정

서버 (server-v2.ts)
- QEMU/ESP8266 restart 엔드포인트: old PTY exit 핸들러가 새 세션을 삭제하던 레이스컨디션 수정 (s.pty = null 가드)
- ESP8266 /pause 엔드포인트 추가
- 정지 시 DELETE → pause로 변경 (세션·firmware 유지, 재시작 가능)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-14 20:12:05 +09:00
kimandClaude Sonnet 4.6 8b649e96d5 Arduino 컴파일: 누락 라이브러리 자동 설치 후 재컴파일
컴파일 에러에서 'fatal error: Foo.h: No such file or directory' 파싱 →
arduino-cli lib search로 최적 라이브러리 찾기 → 자동 설치 → 재컴파일.
성공 시 autoInstalled[] 포함하여 반환, 클라이언트는 "📦 자동 설치" 시스템 메시지 표시.
에러 지속 시 sendCompileErrorToAI()로 AI 채팅에 전달.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 23:03:54 +09:00
kimandClaude Sonnet 4.6 0c46d52f42 코드 에디터: Arduino 컴파일 오류를 AI 채팅으로 자동 전송
오류 발생 시 codeAiAppend(system) 대신 sendCompileErrorToAI()로
에러 메시지 + 코드 컨텍스트를 AI 입력창에 넣고 즉시 전송.
arduino / esp32 / 에뮬레이터 버튼 세 경로 모두 적용.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 22:59:50 +09:00
kimandClaude Sonnet 4.6 e3920dd157 코드 에디터: 터미널 버튼 아래에 에뮬레이터 버튼 추가
.ino 파일이 열려 있으면 자동 컴파일 후 에뮬레이터 탭 열기,
아니면 에뮬레이터 창만 열기. 컴파일 중 버튼 텍스트로 상태 표시.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 22:54:23 +09:00
kimandClaude Fable 5 fae47a0962 Code editor: Arduino 에뮬레이터(avr8js) + ESP32 Web Serial 플래셔
- web-ui/arduino-emulator.html: avr8js 기반 ATmega328P 에뮬레이터
  (핀 상태 패널, 보드 LED, 시리얼 모니터, 속도 조절)
  - cpu.tick() 누락 수정: delay()/millis()/Serial 동작 안 하던 버그
  - 시리얼 라인 추적(serialLineSpan): D13 sys 메시지 끼어들 때 줄 깨짐 수정
- web-ui/esp32-flasher.html: Web Serial로 merged.bin 플래시
- POST /api/arduino/compile: arduino-cli로 uno/nano hex, esp32 merged.bin 컴파일
- POST /api/code/round: 클라이언트 주도 코드 에디터용 1라운드 SSE 엔드포인트
- code.js: 실행 모드에 Arduino 에뮬레이터 / ESP32 플래시 추가

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 16:24:45 +09:00
kimandClaude Sonnet 4.6 f00c453de9 Code editor layout: Karpathy toggle, CSS grid layout, AI panel fixes
- 🧠 Karpathy 코딩 가이드라인 토글 버튼 추가 (시스템 프롬프트 주입)
- 모델 셀렉터를 AI 패널 헤더 내부로 이동 (채팅창 너비 연동)
- CSS Grid 레이아웃으로 전환: AI 패널이 파일 탭 상단까지 연장
- 오른쪽 공백 수정: auto 컬럼 → CSS 변수(--ai-panel-w) 제어
- 입력창 소실 수정: #code-ai-panel에 overflow:hidden 추가
- 터미널 불작동 수정: .code-bottom-panels overflow:hidden 제거
- body padding/gap 초기화로 전체 여백 제거

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10 15:10:59 +09:00
kimandClaude Sonnet 4.6 158a156746 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>
2026-06-10 10:23:19 +09:00
kimandClaude Sonnet 4.6 9b558be9f4 Code editor: block flip-flop colors, view option buttons, terminal error improvements, live server log bubble
- Add alternating block background colors (ff-block-even/odd) for functions/classes
- Add ¶빈줄숨김 / ▓블록색상 toggle buttons to file panel sidebar (below file tree)
- Fix terminal error send: filter Windows prompt+command lines, only send last Traceback block, strip pygame header noise
- Show live server log bubble during AI tool calls, fade out on completion

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-09 13:57:27 +09:00
kimandClaude Sonnet 4.6 4ead0750b9 Code editor UI: per-file streaming bubbles, options UI, terminal error button, model card
- Per-file streaming: text shows while AI works, collapses on tool call, ✅완료 at end
- Options UI: numbered choice buttons with number/keyword input selection
- Number input in chat (1~6) selects corresponding option chip
- Terminal error 🤖 button permanently visible in header bar
- Model card moved to tabs bar top-right, synced with panel width
- Removed 코드 저장 디렉토리 from settings; merged save/folder into sidebar
- Removed language selector from chat header
- Bottom cards anchored to sidebar bottom
- Simplified planInstruction prompt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 23:14:00 +09:00
kimandClaude Sonnet 4.6 ac518bc2a5 Remove AgentBuilder, add file ops UI, unify code editor prompt routing
- Delete agent-builder-integration.ts, workflow-store.ts, prompts.ts (~1400줄)
- Add move_file tool + sidebar file ops (right-click menu, inline rename, drag-drop, new folder)
- Loop detection: read-only tools block at 2 repeats; planText capped at 12000 chars (fix 413)
- Route proj-gen-*/proj-plan-* to handleCodeChat; remove duplicate codeAiSystemPrompt from handleChat

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 17:12:30 +09:00
kimandClaude Sonnet 4.6 508d11615a Add user workspaces, dental DB scripts, server memory + code editor improvements
- cherry: orofacial/TMD PPTX presentations + 음악가 구강건강 가이드
- papa: sinus/infraoccluded PPTX, garden-monitor Arduino, MIDI files
- databases: PCSP scraper, translation scripts, vision benchmark, batch JSONs
- web-ui: code.js/companion.py/styles.css major updates, autostart installer
- src: ollama-client, session, LLMProvider, ollama-adapter patches
- .gitignore: add claude-key, SQLite WAL/SHM, __pycache__, nohup.out

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-07 23:13:03 +09:00
kimandClaude Sonnet 4.6 1a4f77f811 Show context bar always (not only when history exists)
히스토리 없어도 '0 / 200k' 형태로 항상 표시 → 클릭으로 최대값 재확인 가능.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 14:46:20 +09:00
kimandClaude Sonnet 4.6 753adec64d Fetch real model context window from server for session bar
GET /api/model-context?model=<name> 엔드포인트 추가.
Claude → 200k 고정, Ollama → /api/show 쿼리 후 model_info 또는
num_ctx 파라미터에서 실제 컨텍스트 크기 추출.
클라이언트: 모델 변경 및 초기 부팅 시 자동 fetch.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 14:38:11 +09:00
kimandClaude Sonnet 4.6 1350ece55a Add context usage indicator to code editor session bar
세션 바에 현재 컨텍스트 토큰 추정치 / 모델 최대값 표시.
글자 수 ÷ 4 로 토큰 추정, 50% 이하 초록 / 50~80% 노랑 / 80%+ 빨강 색상 진행 바.
메시지 전송·응답 완료 시 즉시 업데이트.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 14:33:54 +09:00
kimandClaude Sonnet 4.6 d612b32d2e Fix multi-file diff: auto-advance to next pending diff after accept
여러 파일 편집 시 첫 번째 diff 수락 후 다음 파일로 자동 이동.
diff 바에 남은 파일 수 표시 (예: "2개 파일 남음").

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 14:22:05 +09:00
kimandClaude Sonnet 4.6 2f07dbf1fa Release 2.9.9: 오케스트레이터 버그 수정 + 로컬 터미널 프로젝트 동기화
- 오케스트레이터 auto-trigger 경로에 !isCodeAiSession/!isProjSession 누락 수정
  (code_ai_ 세션에서 tool failure 쌓이면 memory_read 등 엉뚱한 도구 호출로 멈추던 문제)
- 로컬 셸 시작/프로젝트 전환 시 프로젝트 폴더로 자동 cd
- companion.py: shell_ready에 platform/home 정보 포함
- Windows/Unix 경로 처리: cd /d "경로" vs cd "경로"
- localTermPath 미설정 시 companionHome fallback, 둘 다 없으면 cd 안 함

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 13:52:37 +09:00
kimandClaude Sonnet 4.6 3bebb4efc5 Fix local shell: fit before sending shell request to companion
터미널 패널이 닫힌 상태에서 로컬 셸을 열면 레이아웃 계산 전에
fitAddon.fit()이 실행돼 rows=0/cols=0으로 companion에 전달됨.
300ms 타임아웃 안에서 fit을 재실행하고 최솟값(24x80) 보장.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 13:24:38 +09:00
kimandClaude Sonnet 4.6 7c6a73512a Release 2.9.8: 코드 에디터 로컬 모드 개선 + 프로젝트 마법사 리팩토링
- 로컬 모드 shell 차단: error:true로 변경, 시스템 프롬프트에 명시적 금지 문구 추가
- 로컬 모드 파일 자동 저장: 새 파일 생성 시 승인 팝업 없이 즉시 디스크 저장 + "💾 저장" 알림
- 계획 단계 프롬프트 강화: 파일별 주요 함수/로직/데이터흐름/주의사항 포함
- 프로젝트 마법사 디폴트화: 새 세션 생성 시 자동으로 계획 단계 진입
- _isNewProjectIntent / _isSingleFileIntent 제거: 수동 프로젝트 생성으로 대체
- 채팅 히스토리 버그 수정: codeAiClear에서 history 지우기 전 saveProjectSession 호출
- 초기 로드 버그 수정: restoreLocalDirHandle에서 채팅 패널 렌더링 누락 수정

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 12:43:43 +09:00
kimandClaude Sonnet 4.6 027ba8725e Release 2.9.7: 코드 에디터 로컬 파일시스템 + 프로젝트 생성 개선
- 코드 에디터 저장: 서버 API → File System Access API로 전환
  - codeSaveFileById에 저장 성공/실패/폴더미선택 피드백 메시지 추가
- 프로젝트 생성 형식: project-files JSON → @@FILE/@@ENDFILE 델리미터로 변경
  - JSON 이스케이프 오류(Unterminated string) 근본 해결
- 계획 단계 시스템 프롬프트 강화: JSON 출력 절대 금지 명시
- 프로젝트 생성 세션 ID: 계획 세션 재사용 (서버가 history 파라미터 무시하므로)
- _projFileCreated async화: 파일 쓰기 완료 후 사이드바 리프레시
- 헤더/드롭다운 폴더명 표시 동적 업데이트 (workspace/code/ 하드코딩 제거)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04 18:08:45 +09:00
kimandClaude Sonnet 4.6 d9df800524 Release 2.9.1: PPTX wizard project persistence + PDF column extraction
- PDF: PyMuPDF 2-column aware extraction (left col → right col, drop cap merge,
  header/footer/footnote removal), reference stripping, 200k char limit
- Wizard: chunked parallel translation (15k chars/chunk, ~4x faster)
- Wizard: save UPL_ (upload) papers to papers.json (were silently skipped)
- Wizard: restore UPL_ papers from manifest with _isUpload/_localPdf fields
- Wizard: project-papers endpoint correctly resolves UPL_ ko.txt in project dir
- Wizard: images loaded on manifest restore (renderImgGrid unconditional)
- Wizard: outline.json auto-save after generation and slide edits
- Wizard: outline.json fallback load when no PPTX exists
- Wizard: loadProjList() refresh after savePapersToProject()
- Code editor: default font size 14→12px

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-01 23:29:54 +09:00
kimandClaude Opus 4.8 6963ccb9a0 Release 2.9.0: open code editor in a standalone browser tab
The 💻 코드 sidebar tab now opens a dedicated code.html page in a new tab,
mirroring how the slide wizard opens pptx-wizard.html.

- Add web-ui/code.html: standalone code editor page reusing styles.css and
  the same CodeMirror/xterm/Monaco head as the main app.
- Add web-ui/code.js: self-contained code-view logic — inlined shared helpers
  (api/authHeaders/escHtml/getCookie) + the extracted code-editor block +
  a bootstrap that inits Monaco and loads models/dir. It mirrors the code
  block in app.js (kept duplicated so the main app stays untouched).
- index.html: tab-code now window.open('/code.html'). The in-page code mode
  (top mode button) is unchanged, so chat→editor live streaming still works.

Verified with Playwright: Monaco initializes, editor/sidebar/toolbar/Coder AI
render, no JS errors.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 21:07:22 +09:00