feat: integrate bullet points in ResponsePanel with CSS list-style
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
parent
1fdd2a70a5
commit
c43cb372e9
|
|
@ -4,6 +4,7 @@ import ReactMarkdown from 'react-markdown'
|
||||||
import type { SourceMetadata, SubQuestionSources } from '../types'
|
import type { SourceMetadata, SubQuestionSources } from '../types'
|
||||||
import { getPdfViewerUrl } from '../lib/api'
|
import { getPdfViewerUrl } from '../lib/api'
|
||||||
import { processCitations, processCitationsForSubq } from '../utils/citationParser'
|
import { processCitations, processCitationsForSubq } from '../utils/citationParser'
|
||||||
|
import { bulletizeMarkdown } from '../utils/citationParser'
|
||||||
|
|
||||||
interface ResponsePanelProps {
|
interface ResponsePanelProps {
|
||||||
answer: string | null
|
answer: string | null
|
||||||
|
|
@ -27,8 +28,8 @@ const CitationLink = ({ href, children }: { href?: string; children?: React.Reac
|
||||||
|
|
||||||
function parseAnswerSections(answer: string): string[] {
|
function parseAnswerSections(answer: string): string[] {
|
||||||
const sections = answer.split(/## Sub-question \d+:[^\n]*\n/)
|
const sections = answer.split(/## Sub-question \d+:[^\n]*\n/)
|
||||||
if (sections.length <= 1) return [answer]
|
if (sections.length <= 1) return [bulletizeMarkdown(answer)]
|
||||||
return sections.filter((s) => s.trim().length > 0).map((s) => s.trim())
|
return sections.filter((s) => s.trim().length > 0).map((s) => bulletizeMarkdown(s.trim()))
|
||||||
}
|
}
|
||||||
|
|
||||||
function SubQuestionSourceCard({ source, index }: { source: SourceMetadata; index: number }) {
|
function SubQuestionSourceCard({ source, index }: { source: SourceMetadata; index: number }) {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,12 @@
|
||||||
@tailwind base;
|
@tailwind base;
|
||||||
@tailwind components;
|
@tailwind components;
|
||||||
@tailwind utilities;
|
@tailwind utilities;
|
||||||
|
|
||||||
|
.prose ul {
|
||||||
|
list-style: disc !important;
|
||||||
|
padding-left: 1.5rem !important;
|
||||||
|
}
|
||||||
|
.prose ol {
|
||||||
|
list-style: decimal !important;
|
||||||
|
padding-left: 1.5rem !important;
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue