2025.05.31(토)

오유찬·2025년 5월 31일

개발

목록 보기
5/5
  1. 보안 리팩토링 API 연결
    코드를 스크랩한 후, castle coder: security refactoring을 클릭하면 코드를sendUserPrompt로 전송하여 그대로 채팅창에 띄우고 있다. API와 연결하기 전에, sendUserPrompt가 어떤 함순지 확인해보자.
  public sendUserPrompt(prompt: string) {
    this._view?.webview.postMessage({ type: 'userPrompt', prompt });
  }

이 부분은 다시 또 아래와 같이 연결.

  if (type === 'userPrompt') {
   renderChatView(prompt);
 }

renderChatView 함수를 이용하는데 이는 지금 다른 로직들이 많이 활용 중에 있기 때문에 로직을 굳이 세우기보다는 userPrompt type 말고 securityPrompt를 설정한 후에 새로운 함수를 만들어서 진행하자.

->security refacotring API 연결 완료.

TODO

  • security refacotring response markdown 형식 출력
  • 이미지 파일 추가했을 때의 LLM 통신 기능 구현 및 API 연결
profile
열심히 하면 재밌다

0개의 댓글