Skip to content
Merged

Dev #67

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,12 @@ public AnalysisResultDto refreshMindmap(String repoUrl, String prompt, String au

try {
// Step 1: μ΅œμ‹  λ³€κ²½μ‚¬ν•­λ§Œ λΉ λ₯΄κ²Œ μƒˆλ‘œκ³ μΉ¨
RefreshResponse refreshResult = refreshLatest(mapId, prompt, authorizationHeader);
RefreshResponse refreshResult = refreshLatest(mapId, prompt, repoUrl, authorizationHeader);
log.info("μƒˆλ‘œκ³ μΉ¨ μ™„λ£Œ - λ³€κ²½ 파일: {}, 뢄석 디렉터리: {}",
refreshResult.getChanged_files(), refreshResult.getDirs_analyzed());

// Step 2: μ €μž₯μ†Œ 정보 쑰회
saveRepoInfo(repoUrl, authorizationHeader);
RepoInfoResponse repoInfo = getRepoInfo(mapId, authorizationHeader);

// μƒˆλ‘œκ³ μΉ¨ κ²°κ³Όλ₯Ό DTO둜 λ³€ν™˜
Expand Down Expand Up @@ -175,13 +176,12 @@ public MindmapGraphDto getGraph(String mapId, String authHeader) {
// TODO: ν”„λ‘¬ν”„νŠΈ summary λ°˜ν™˜

// μ΅œμ‹  변경사항 μƒˆλ‘œκ³ μΉ¨
public RefreshResponse refreshLatest(String mapId, String prompt, String authHeader) {
public RefreshResponse refreshLatest(String mapId, String prompt, String repoUrl, String authHeader) {
Map<String, Object> request = new HashMap<>();
request.put("repo_url", repoUrl);
if (StringUtils.hasText(prompt)) {
request.put("prompt", prompt);
}
request.put("max_dirs", 10);
request.put("max_files_per_dir", 5);

return webClient.post()
.uri("/mindmap/{mapId}/refresh-latest", mapId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ public class NodeDto {
@JsonProperty("node_type")
private String nodeType;

private String mode;

// 편의 λ©”μ„œλ“œ
public boolean isFileNode() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public void refreshMindmap(Long mapId, String authHeader) {
PromptHistory appliedPrompt = mindmap.getAppliedPromptHistory();

String repoUrl = mindmap.getRepo().getGithubRepoUrl();
String prompt = appliedPrompt.getPrompt();
String prompt = (appliedPrompt != null) ? appliedPrompt.getPrompt() : null;

// FastAPI 뢄석 μš”μ²­
AnalysisResultDto analysisResult = fastApiClient.refreshMindmap(
Expand All @@ -96,7 +96,7 @@ public void refreshMindmap(Long mapId, String authHeader) {
);

// 뢄석 κ²°κ³Όλ₯Ό DB에 μ—…λ°μ΄νŠΈ (νŠΈλžœμž­μ…˜)
mindmapService.updateMindmapFromAnalysis(mapId,authHeader, analysisResult);
mindmapService.updateMindmapFromAnalysis(mapId, authHeader, analysisResult);
log.info("비동기 μƒˆλ‘œκ³ μΉ¨ 성곡 - λ§ˆμΈλ“œλ§΅ ID: {}", mapId);

} catch (Exception e) {
Expand Down