fix: improve chat UI streaming feedback and fix test image path
All checks were successful
continuous-integration/drone/push Build is passing

- Add loading spinner with 'Thinking...' text during streaming when
  content is not yet available
- Fix :key binding to use message.id instead of message.content
- Remove unnecessary TypeScript cast in file reader handler
- Move test image into testdata/ directory for proper test organization
- Remove t.Skip and simplify TestSummarizeChat test message
This commit is contained in:
2026-05-01 21:04:26 -04:00
parent 2154a9f203
commit 0dd9521419
3 changed files with 16 additions and 7 deletions

View File

@@ -66,8 +66,6 @@ func TestSendMessage(t *testing.T) {
}
func TestSummarizeChat(t *testing.T) {
t.Skip("requires live LLM API - run manually with: go test -run TestSummarizeChat ./internal/client/")
// Initialize Client
baseURL, err := url.Parse("https://llm-api.va.reichard.io/v1")
if err != nil {
@@ -80,8 +78,7 @@ func TestSummarizeChat(t *testing.T) {
defer cancel()
// Generate Text Stream
userMessage := "Write me a go program that reads in a zip file and prints the contents along with their sizes and mimetype."
output, err := client.CreateTitle(ctx, userMessage, model)
output, err := client.CreateTitle(ctx, "Hi!", model)
if err != nil {
t.Fatalf("Failed to generate text stream: %v", err)
}
@@ -108,7 +105,7 @@ func TestSendMessageWithImage(t *testing.T) {
defer cancel()
// Load Test Image and Convert to Base64 Data URL
imgData, err := os.ReadFile("test_image.jpg")
imgData, err := os.ReadFile("./testdata/test_image.jpg")
if err != nil {
t.Fatalf("Failed to read test image: %v", err)
}