Skip to content

Revert "refactor: Slack 내 AI 관련 리팩토링"#379

Merged
dh2906 merged 1 commit intodevelopfrom
revert-376-refactor/ai-in-slack
Mar 11, 2026
Merged

Revert "refactor: Slack 내 AI 관련 리팩토링"#379
dh2906 merged 1 commit intodevelopfrom
revert-376-refactor/ai-in-slack

Conversation

@dh2906
Copy link
Contributor

@dh2906 dh2906 commented Mar 11, 2026

Reverts #376

@dh2906 dh2906 merged commit c9106c0 into develop Mar 11, 2026
1 check passed
@dh2906 dh2906 deleted the revert-376-refactor/ai-in-slack branch March 11, 2026 09:31
@coderabbitai
Copy link

coderabbitai bot commented Mar 11, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 853a3829-ba70-48c4-8973-f80106d13054

📥 Commits

Reviewing files that changed from the base of the PR and between c13d602 and fc20508.

📒 Files selected for processing (8)
  • .env.example
  • src/main/java/gg/agit/konect/infrastructure/claude/client/ClaudeClient.java
  • src/main/java/gg/agit/konect/infrastructure/slack/ai/SlackAIService.java
  • src/main/java/gg/agit/konect/infrastructure/slack/ai/SlackEventController.java
  • src/main/java/gg/agit/konect/infrastructure/slack/client/SlackClient.java
  • src/main/java/gg/agit/konect/infrastructure/slack/config/SlackProperties.java
  • src/main/resources/application-db.yml
  • src/main/resources/application-infrastructure.yml

📝 Walkthrough

Walkthrough

이 PR은 Slack-Claude AI 통합에서 스레드 기반 대화 처리 기능을 제거하고 bot 토큰 의존성을 삭제하여 시스템을 단순화합니다. ClaudeClient와 SlackAIService의 메서드가 제거되며, 관련 설정 파일도 정리됩니다.

Changes

Cohort / File(s) Summary
Slack AI 통합 단순화
src/main/java/gg/agit/konect/infrastructure/slack/ai/SlackAIService.java, src/main/java/gg/agit/konect/infrastructure/slack/ai/SlackEventController.java
processAIQuery 메서드 서명 단순화, 복잡한 스레드 기반 대화 처리 로직 제거, SlackProperties 추가 통합, 스레드 관련 메서드 제거(fetchAIThreadReplies, buildConversationHistory, mergeConsecutiveRoles)
Slack 클라이언트 정리
src/main/java/gg/agit/konect/infrastructure/slack/client/SlackClient.java, src/main/java/gg/agit/konect/infrastructure/slack/config/SlackProperties.java
postThreadReply, getThreadReplies 메서드 제거, 불필요한 필드(slackProperties, objectMapper) 제거, SlackProperties에서 botToken 필드 제거
Claude 클라이언트 개선
src/main/java/gg/agit/konect/infrastructure/claude/client/ClaudeClient.java
오버로드된 chat(List<Map<String, Object>> initialMessages) 메서드 제거, chat(String userMessage)가 내부에서 메시지 목록을 직접 구성하도록 변경
설정 파일 정리
.env.example, src/main/resources/application-infrastructure.yml, src/main/resources/application-db.yml
SLACK_BOT_TOKEN 설정 제거, Hibernate JDBC timezone 설정 제거

Sequence Diagram

sequenceDiagram
    participant Controller as SlackEventController
    participant Service as SlackAIService
    participant Claude as ClaudeClient
    participant Client as SlackClient
    participant Config as SlackProperties

    Note over Controller,Config: 개선 전: 스레드 기반 대화 처리
    Controller->>Service: processAIQuery(text, channelId, threadTs, cachedReplies)
    Service->>Service: fetchAIThreadReplies(channelId, threadTs)
    Service->>Service: buildConversationHistory(replies)
    Service->>Claude: chat(List<messages>)
    Claude-->>Service: AI 응답
    Service->>Client: postThreadReply(channelId, threadTs, message)
    Client-->>Service: 완료

    Note over Controller,Config: 개선 후: 단순화된 메시지 처리
    Controller->>Service: processAIQuery(text)
    Service->>Claude: chat(text)
    Claude-->>Service: AI 응답
    Service->>Config: getEventWebhookUrl()
    Config-->>Service: Webhook URL
    Service->>Client: sendMessage(webhook, message)
    Client-->>Service: 완료
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested labels

리팩토링

Poem

🐰 토닥토닥, 복잡한 스레드를 정리하고,
Bot 토큰도 작별 인사 하네.
단순하고 깔끔한 메시지 흐름,
Claude와 Slack이 손잡으니,
시스템도 함께 춤을 춘다! ✨

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch revert-376-refactor/ai-in-slack

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant