Spaces:
Paused

dushyantsingh0 commited on
Commit
ef9f115
·
1 Parent(s): 42ff903

backend stabilisation

Browse files
frontend/apps/customer/src/components/KnowledgeBase.module.css CHANGED
@@ -302,22 +302,6 @@
302
  padding-left: 10px;
303
  }
304
 
305
- .answerText strong {
306
- font-weight: 800;
307
- color: var(--primary);
308
- }
309
-
310
- .answerText code {
311
- background: var(--bg-hover);
312
- padding: 3px 8px;
313
- border-radius: 6px;
314
- font-family: var(--font-mono);
315
- font-size: 0.9em;
316
- color: var(--primary);
317
- border: 1px solid var(--border-subtle);
318
- margin: 0 4px;
319
- }
320
-
321
  .spotlightFooter {
322
  margin-top: 32px;
323
  padding-top: 28px;
 
302
  padding-left: 10px;
303
  }
304
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
305
  .spotlightFooter {
306
  margin-top: 32px;
307
  padding-top: 28px;
frontend/apps/customer/src/index.css CHANGED
@@ -88,16 +88,6 @@ p {
88
  font-weight: 500;
89
  }
90
 
91
- code {
92
- font-family: var(--mono);
93
- font-size: 0.9em;
94
- background: var(--bg-card);
95
- padding: 2px 6px;
96
- border-radius: 6px;
97
- border: 1px solid var(--border-subtle);
98
- color: var(--primary);
99
- }
100
-
101
  /* Premium Component Foundations */
102
  .glass-card {
103
  background: var(--bg-card);
 
88
  font-weight: 500;
89
  }
90
 
 
 
 
 
 
 
 
 
 
 
91
  /* Premium Component Foundations */
92
  .glass-card {
93
  background: var(--bg-card);
frontend/apps/internal/src/components/KnowledgeBase.module.css CHANGED
@@ -1547,23 +1547,6 @@
1547
  line-height: 1.8;
1548
  }
1549
 
1550
- .answerText code {
1551
- background: var(--bg-hover);
1552
- padding: 3px 8px;
1553
- border-radius: 6px;
1554
- font-family: var(--font-mono);
1555
- font-size: 0.9em;
1556
- color: var(--primary);
1557
- border: 1px solid var(--border-subtle);
1558
- margin: 0 4px;
1559
- }
1560
-
1561
- .answerText strong {
1562
- font-weight: 800;
1563
- color: var(--primary);
1564
- letter-spacing: -0.01em;
1565
- }
1566
-
1567
  .spotlightFooter {
1568
  margin-top: 32px;
1569
  padding-top: 24px;
 
1547
  line-height: 1.8;
1548
  }
1549
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1550
  .spotlightFooter {
1551
  margin-top: 32px;
1552
  padding-top: 24px;
frontend/packages/shared/src/components/NexusMarkdown.tsx CHANGED
@@ -35,10 +35,9 @@ export const NexusMarkdown: React.FC<NexusMarkdownProps> = ({ content, isMe }) =
35
  .replace(/(\*\*[^*]+\*\*)and(\*\*[^*]+\*\*)/gi, '$1 and $2')
36
 
37
  // 2. Syntax Repair: Strictly enforce NO spaces inside bold/italic markers
38
- .replace(/\*\*[\s\n]+([^*]+?)[\s\n]+\*\*/g, '**$1**')
39
- .replace(/\*[\s\n]+([^*]+?)[\s\n]+\*/g, '*$1*')
40
- .replace(/\*\*[\s\n]+([^*]+?)\*\*/g, '**$1**')
41
- .replace(/\*\*([^*]+?)[\s\n]+\*\*/g, '**$1**')
42
 
43
  // 3. Collision Repair: Ensure spaces OUTSIDE bold markers using word boundaries
44
  // Add space BEFORE bold if it's preceded by a character and is the START of a tag
@@ -130,15 +129,15 @@ export const NexusMarkdown: React.FC<NexusMarkdownProps> = ({ content, isMe }) =
130
  display: (inline || forceInline) ? 'inline' : 'block',
131
  width: (inline || forceInline) ? 'auto' : 'fit-content',
132
  minWidth: (inline || forceInline) ? 'auto' : '100px',
133
- background: isMe ? 'rgba(255,255,255,0.15)' : 'var(--bg-panel)',
134
- padding: (inline || forceInline) ? '4px 10px' : '10px 20px',
135
- borderRadius: (inline || forceInline) ? 8 : 12,
136
- fontSize: '0.9em',
137
  fontFamily: 'var(--font-mono)',
138
  color: isMe ? '#fff' : 'var(--primary)',
139
- fontWeight: 600,
140
- border: isMe ? 'none' : '1px solid var(--border-subtle)',
141
- margin: (inline || forceInline) ? '0 4px' : '8px 0',
142
  overflowX: 'auto'
143
  }}
144
  {...props}
@@ -160,12 +159,12 @@ export const NexusMarkdown: React.FC<NexusMarkdownProps> = ({ content, isMe }) =
160
  // Highlight override (using del syntax)
161
  del: ({ children }) => (
162
  <mark style={{
163
- background: theme === 'dark' ? 'rgba(124, 58, 237, 0.25)' : 'rgba(124, 58, 237, 0.1)',
164
  color: 'var(--primary)',
165
- padding: '2px 6px',
166
- borderRadius: '6px',
167
- border: '1px solid var(--primary-glow)',
168
- fontWeight: 600,
169
  textDecoration: 'none'
170
  }}>{children}</mark>
171
  ),
 
35
  .replace(/(\*\*[^*]+\*\*)and(\*\*[^*]+\*\*)/gi, '$1 and $2')
36
 
37
  // 2. Syntax Repair: Strictly enforce NO spaces inside bold/italic markers
38
+ // Using a more robust trim-based replacement
39
+ .replace(/\*\*+([^*]+?)\*\*+/g, (_, p1) => `**${p1.trim()}**`)
40
+ .replace(/(?<!\*)\*([^*]+?)\*(?!\*)/g, (_, p1) => `*${p1.trim()}*`)
 
41
 
42
  // 3. Collision Repair: Ensure spaces OUTSIDE bold markers using word boundaries
43
  // Add space BEFORE bold if it's preceded by a character and is the START of a tag
 
129
  display: (inline || forceInline) ? 'inline' : 'block',
130
  width: (inline || forceInline) ? 'auto' : 'fit-content',
131
  minWidth: (inline || forceInline) ? 'auto' : '100px',
132
+ background: 'transparent',
133
+ padding: 0,
134
+ borderRadius: 0,
135
+ fontSize: '0.95em',
136
  fontFamily: 'var(--font-mono)',
137
  color: isMe ? '#fff' : 'var(--primary)',
138
+ fontWeight: 700,
139
+ border: 'none',
140
+ margin: 0,
141
  overflowX: 'auto'
142
  }}
143
  {...props}
 
159
  // Highlight override (using del syntax)
160
  del: ({ children }) => (
161
  <mark style={{
162
+ background: theme === 'dark' ? 'rgba(124, 58, 237, 0.2)' : 'rgba(124, 58, 237, 0.08)',
163
  color: 'var(--primary)',
164
+ padding: '1px 4px',
165
+ borderRadius: '4px',
166
+ border: 'none',
167
+ fontWeight: 700,
168
  textDecoration: 'none'
169
  }}>{children}</mark>
170
  ),