@djangocfg/ui-tools 2.1.420 → 2.1.422

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": "@djangocfg/ui-tools",
3
- "version": "2.1.420",
3
+ "version": "2.1.422",
4
4
  "description": "Heavy React tools with lazy loading - for Electron, Vite, CRA, Next.js apps",
5
5
  "keywords": [
6
6
  "ui-tools",
@@ -329,8 +329,8 @@
329
329
  "test:watch": "vitest"
330
330
  },
331
331
  "peerDependencies": {
332
- "@djangocfg/i18n": "^2.1.420",
333
- "@djangocfg/ui-core": "^2.1.420",
332
+ "@djangocfg/i18n": "^2.1.422",
333
+ "@djangocfg/ui-core": "^2.1.422",
334
334
  "consola": "^3.4.2",
335
335
  "lodash-es": "^4.18.1",
336
336
  "lucide-react": "^0.545.0",
@@ -405,9 +405,9 @@
405
405
  "@maplibre/maplibre-gl-geocoder": "^1.7.0"
406
406
  },
407
407
  "devDependencies": {
408
- "@djangocfg/i18n": "^2.1.420",
409
- "@djangocfg/typescript-config": "^2.1.420",
410
- "@djangocfg/ui-core": "^2.1.420",
408
+ "@djangocfg/i18n": "^2.1.422",
409
+ "@djangocfg/typescript-config": "^2.1.422",
410
+ "@djangocfg/ui-core": "^2.1.422",
411
411
  "@types/lodash-es": "^4.17.12",
412
412
  "@types/mapbox__mapbox-gl-draw": "^1.4.8",
413
413
  "@types/node": "^25.2.3",
@@ -196,7 +196,11 @@ export function reducer(state: ChatState, action: ChatAction): ChatState {
196
196
  ...m,
197
197
  content: m.content + action.delta,
198
198
  }));
199
- return { ...state, messages };
199
+ // Content is now streaming in for the current turn (STREAM_START opened a
200
+ // fresh placeholder; chunks only land on it). If an error from a prior
201
+ // turn is still showing, retract it the moment a good answer begins so
202
+ // the banner can't sit above live content. Only touch `error` when set.
203
+ return state.error ? { ...state, error: null, messages } : { ...state, messages };
200
204
  }
201
205
 
202
206
  case 'STREAM_TOOL_ACTIVITY': {
@@ -268,7 +272,11 @@ export function reducer(state: ChatState, action: ChatAction): ChatState {
268
272
  msg && !msg.content && !(msg.toolCalls?.length)
269
273
  ? patched.filter((m) => m.id !== action.id)
270
274
  : patched;
271
- return { ...state, isStreaming: false, messages };
275
+ // A turn that reaches message_end completed successfully (error is the
276
+ // other terminal event — the two are mutually exclusive per turn). Any
277
+ // `error` still in state therefore belongs to a prior turn and is now
278
+ // stale, so clear it: otherwise the banner lingers above a good answer.
279
+ return { ...state, isStreaming: false, error: null, messages };
272
280
  }
273
281
 
274
282
  case 'STREAM_CANCELLED': {
@@ -177,8 +177,10 @@ function MarkdownMessageRaw({
177
177
  // turns multi-line user messages into airy ladders. snug matches
178
178
  // WhatsApp/Telegram bubble density.
179
179
  return (
180
+ // `select-text` keeps prose selectable under native-host
181
+ // `body { user-select: none }` (Wails/Electron); no-op on web.
180
182
  <div
181
- className={`${textSizeClass} font-normal antialiased leading-snug break-words whitespace-pre-wrap ${className}`}
183
+ className={`select-text ${textSizeClass} font-normal antialiased leading-snug break-words whitespace-pre-wrap ${className}`}
182
184
  >
183
185
  {displayContent}
184
186
  {collapsible && shouldCollapse && (
@@ -199,7 +201,9 @@ function MarkdownMessageRaw({
199
201
  }
200
202
 
201
203
  return (
202
- <div className={className}>
204
+ // `select-text` keeps prose + code blocks selectable under native-host
205
+ // `body { user-select: none }` (Wails/Electron); no-op on web.
206
+ <div className={`select-text ${className}`}>
203
207
  <div
204
208
  className={`
205
209
  prose ${proseClass} max-w-none break-words overflow-hidden ${textSizeClass} font-normal antialiased