fluxy-bot 0.2.29 → 0.2.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxy-bot",
3
- "version": "0.2.29",
3
+ "version": "0.2.30",
4
4
  "description": "Self-hosted AI bot — run your own AI assistant from anywhere",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -43,7 +43,7 @@ export default function MessageBubble({ role, content, timestamp, hasAttachments
43
43
  if (audioData) {
44
44
  return (
45
45
  <div className="flex flex-col items-end gap-0.5">
46
- <div className="max-w-[75%] rounded-2xl px-4 py-2.5 text-sm leading-relaxed bg-primary text-primary-foreground">
46
+ <div className="max-w-[85%] rounded-2xl px-4 py-2.5 text-sm leading-relaxed bg-primary text-primary-foreground">
47
47
  <AudioBubble audioData={audioData} />
48
48
  </div>
49
49
  {time && <span className="text-[10px] text-muted-foreground/50 px-1">{time}</span>}
@@ -53,7 +53,7 @@ export default function MessageBubble({ role, content, timestamp, hasAttachments
53
53
 
54
54
  return (
55
55
  <div className="flex flex-col items-end gap-0.5">
56
- <div className="max-w-[75%] rounded-2xl px-4 py-2.5 text-sm leading-relaxed whitespace-pre-wrap bg-primary text-primary-foreground break-words overflow-hidden" style={{ overflowWrap: 'anywhere' }}>
56
+ <div className="max-w-[85%] rounded-2xl px-4 py-2.5 text-sm leading-relaxed whitespace-pre-wrap bg-primary text-primary-foreground break-words overflow-hidden" style={{ overflowWrap: 'anywhere' }}>
57
57
  {/* Image thumbnails */}
58
58
  {imageUrls.length > 0 && (
59
59
  <div className="flex gap-1.5 flex-wrap mb-2">
@@ -90,10 +90,13 @@ export default function MessageBubble({ role, content, timestamp, hasAttachments
90
90
 
91
91
  return (
92
92
  <div className="flex flex-col items-start gap-0.5">
93
- <div className="max-w-[75%] min-w-0 rounded-2xl px-4 py-2.5 text-sm leading-relaxed bg-muted text-foreground prose prose-sm prose-invert [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 break-words overflow-hidden" style={{ overflowWrap: 'anywhere' }}>
93
+ <div className="min-w-0 rounded-2xl px-4 py-2.5 text-sm leading-relaxed bg-muted text-foreground prose prose-sm prose-invert max-w-none [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 break-words overflow-hidden" style={{ maxWidth: '85%', overflowWrap: 'anywhere' }}>
94
94
  <ReactMarkdown
95
95
  remarkPlugins={[remarkGfm]}
96
96
  components={{
97
+ pre({ children }) {
98
+ return <pre className="overflow-x-auto my-2">{children}</pre>;
99
+ },
97
100
  code({ className, children, ...props }) {
98
101
  const match = /language-(\w+)/.exec(className || '');
99
102
  const code = String(children).replace(/\n$/, '');
@@ -103,14 +106,14 @@ export default function MessageBubble({ role, content, timestamp, hasAttachments
103
106
  style={oneDark}
104
107
  language={match[1]}
105
108
  PreTag="div"
106
- customStyle={{ margin: '0.5rem 0', borderRadius: '0.5rem', fontSize: '0.8rem' }}
109
+ customStyle={{ margin: '0.5rem 0', borderRadius: '0.5rem', fontSize: '0.8rem', overflowX: 'auto' }}
107
110
  >
108
111
  {code}
109
112
  </SyntaxHighlighter>
110
113
  );
111
114
  }
112
115
  return (
113
- <code className="bg-white/10 rounded px-1 py-0.5 text-[0.8rem]" {...props}>
116
+ <code className="bg-white/10 rounded px-1 py-0.5 text-[0.8rem] break-all" style={{ whiteSpace: 'pre-wrap', overflowWrap: 'anywhere' }} {...props}>
114
117
  {children}
115
118
  </code>
116
119
  );