Files
resolutionflow/frontend/src/api/assistantChat.ts
chihlasm 8e7f13d2f8 refactor: remove dead assistant_chat system, consolidate image helpers
The old /assistant/chats/* CRUD endpoints and assistant_chat_service
chat functions were unused — the frontend exclusively uses
/ai-sessions/{id}/chat (unified_chat_service) for all chat operations.

Removed:
- Chat CRUD endpoints (create, list, get, send, delete, conclude)
- assistant_chat_service: create_chat, send_message,
  generate_conclusion_summary, CONCLUSION_SYSTEM_PROMPT
- Frontend: assistantChatApi chat methods, dead types
  (AssistantChat, AssistantChatMessage, ConcludeChatRequest, etc.)

Kept:
- /assistant/retention endpoints (used by ChatRetentionSettingsPage)
- Shared AI infrastructure (_call_ai, _call_anthropic_cached,
  ASSISTANT_SYSTEM_PROMPT, _auto_title) — imported by unified_chat_service

Moved:
- fetch_upload_images + resize_image_for_vision → storage_service.py
  (shared location, not tied to dead endpoint)

Also added "Image Analysis" section to system prompt so Claude knows
to describe attached screenshots.

-650 lines of dead code removed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 05:28:06 +00:00

23 lines
765 B
TypeScript

import apiClient from './client'
import type { RetentionSettings } from '@/types/assistant-chat'
/**
* Chat retention settings API.
*
* Note: Chat CRUD methods were removed — the frontend uses aiSessionsApi
* for all chat operations. Only retention settings remain on the /assistant prefix.
*/
export const assistantChatApi = {
async getRetentionSettings(): Promise<RetentionSettings> {
const response = await apiClient.get<RetentionSettings>('/assistant/retention')
return response.data
},
async updateRetentionSettings(data: Partial<RetentionSettings>): Promise<RetentionSettings> {
const response = await apiClient.patch<RetentionSettings>('/assistant/retention', data)
return response.data
},
}
export default assistantChatApi