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