TeahReichenbaum commited on
Commit
a91f32b
·
verified ·
1 Parent(s): 119a6f0

Improve chat readability and source display

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -157,7 +157,7 @@ def format_sources(results: list[tuple[SourceChunk, float]]) -> tuple[str, str]:
157
  for position, (chunk, score) in enumerate(results, start=1):
158
  context_parts.append(f"[S{position}] {chunk.text}")
159
  title = f"[{chunk.title}]({chunk.url})" if chunk.url else chunk.title
160
- source_lines.append(f"**S{position}.** {title} - `{chunk.source_id}`")
161
  return "\n\n".join(context_parts), "\n\n".join(source_lines)
162
 
163
 
@@ -258,9 +258,13 @@ CSS = """
258
  h1, h2, h3, p { color: var(--ink) !important; }
259
  .panel .block, .panel .wrap, .panel .form { background: #fff !important; color: var(--ink) !important; }
260
  .panel input, .panel textarea { background: #fff !important; color: var(--ink) !important; }
261
- #aphaea-chat { background: #fff !important; color: var(--ink) !important; }
262
- #aphaea-chat .wrap { background: #1f2937 !important; }
263
- #aphaea-chat .wrap, #aphaea-chat .wrap * { color: #f8fafc !important; }
 
 
 
 
264
  .panel label, .panel label span, .panel .label-wrap { color: var(--ink) !important; }
265
  button.primary { color: #fff !important; }
266
  .profile-copy { color: var(--muted); font-size: 13px; }
 
157
  for position, (chunk, score) in enumerate(results, start=1):
158
  context_parts.append(f"[S{position}] {chunk.text}")
159
  title = f"[{chunk.title}]({chunk.url})" if chunk.url else chunk.title
160
+ source_lines.append(f"**S{position}.** {title}")
161
  return "\n\n".join(context_parts), "\n\n".join(source_lines)
162
 
163
 
 
258
  h1, h2, h3, p { color: var(--ink) !important; }
259
  .panel .block, .panel .wrap, .panel .form { background: #fff !important; color: var(--ink) !important; }
260
  .panel input, .panel textarea { background: #fff !important; color: var(--ink) !important; }
261
+ #aphaea-chat,
262
+ #aphaea-chat .wrap,
263
+ #aphaea-chat .message,
264
+ #aphaea-chat .message * {
265
+ background: #ffffff !important;
266
+ color: var(--ink) !important;
267
+ }
268
  .panel label, .panel label span, .panel .label-wrap { color: var(--ink) !important; }
269
  button.primary { color: #fff !important; }
270
  .profile-copy { color: var(--muted); font-size: 13px; }