@djangocfg/widget-chat 0.1.8 → 0.1.12
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/widget-chat",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"description": "A transport-agnostic chat surface: a pure core, a store, primitives, a composer, and the assembled components a host mounts",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chat",
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"test:watch": "vitest"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@djangocfg/widget-kit": "^0.1.
|
|
59
|
-
"@djangocfg/widget-media": "^0.1.
|
|
58
|
+
"@djangocfg/widget-kit": "^0.1.13",
|
|
59
|
+
"@djangocfg/widget-media": "^0.1.9",
|
|
60
60
|
"@streamdown/code": "^1.1.1",
|
|
61
61
|
"@streamdown/math": "^1.0.2",
|
|
62
62
|
"mdast-util-to-string": "^4.0.0",
|
|
@@ -66,17 +66,19 @@
|
|
|
66
66
|
"use-stick-to-bottom": "^1.1.6"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@djangocfg/
|
|
70
|
-
"@djangocfg/
|
|
69
|
+
"@djangocfg/api": "^2.1.583",
|
|
70
|
+
"@djangocfg/i18n": "^2.1.583",
|
|
71
|
+
"@djangocfg/ui-core": "^2.1.583",
|
|
71
72
|
"lucide-react": "^0.545.0",
|
|
72
73
|
"react": "^19.0.0",
|
|
73
74
|
"remark-gfm": "^4.0.0",
|
|
74
75
|
"streamdown": "^2.6.0"
|
|
75
76
|
},
|
|
76
77
|
"devDependencies": {
|
|
77
|
-
"@djangocfg/
|
|
78
|
-
"@djangocfg/
|
|
79
|
-
"@djangocfg/
|
|
78
|
+
"@djangocfg/api": "^2.1.583",
|
|
79
|
+
"@djangocfg/i18n": "^2.1.583",
|
|
80
|
+
"@djangocfg/typescript-config": "^2.1.583",
|
|
81
|
+
"@djangocfg/ui-core": "^2.1.583",
|
|
80
82
|
"@storybook/react-vite": "^10.5.0",
|
|
81
83
|
"@types/node": "^25.9.5",
|
|
82
84
|
"@types/react": "19.2.15",
|
|
@@ -2,8 +2,9 @@ import { useLocalStorage } from "@djangocfg/ui-core/hooks";
|
|
|
2
2
|
import { useCallback } from "react";
|
|
3
3
|
|
|
4
4
|
import { forgetTool, rememberTool } from "../../core";
|
|
5
|
+
import { CFG_KEYS } from "@djangocfg/api/storage";
|
|
5
6
|
|
|
6
|
-
const STORAGE_KEY =
|
|
7
|
+
const STORAGE_KEY = CFG_KEYS.chatRecentTools.key;
|
|
7
8
|
|
|
8
9
|
export interface RecentTools {
|
|
9
10
|
readonly ids: readonly string[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CFG_FAMILIES, cfgStorage } from "@djangocfg/api/storage";
|
|
1
2
|
/**
|
|
2
3
|
* What a persisted draft is worth keeping, as a pure decision.
|
|
3
4
|
*
|
|
@@ -9,7 +10,6 @@
|
|
|
9
10
|
/** A draft larger than this is a paste, not typing, and belongs in a chip. */
|
|
10
11
|
export const DRAFT_MAX_LENGTH = 100_000;
|
|
11
12
|
|
|
12
|
-
const PREFIX = "djc.chat.draft:";
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* The storage key for a room. Spelled like `store/use-speech-language.ts`, so
|
|
@@ -20,7 +20,7 @@ const PREFIX = "djc.chat.draft:";
|
|
|
20
20
|
* the old entries to expire with their session.
|
|
21
21
|
*/
|
|
22
22
|
export function draftStorageKey(room: string): string {
|
|
23
|
-
return
|
|
23
|
+
return cfgStorage.familyKey(CFG_FAMILIES.chatDraft, room);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useCallback, useMemo, useState } from "react";
|
|
2
2
|
|
|
3
3
|
import { resolveLanguage } from "../core";
|
|
4
|
+
import { CFG_KEYS } from "@djangocfg/api/storage";
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Which language dictation listens for, and how it is remembered.
|
|
@@ -8,7 +9,7 @@ import { resolveLanguage } from "../core";
|
|
|
8
9
|
* Global, not per-conversation: a language is a property of the SPEAKER, not of
|
|
9
10
|
* the chat they are in. The archive stored it the same way.
|
|
10
11
|
*/
|
|
11
|
-
const STORAGE_KEY =
|
|
12
|
+
const STORAGE_KEY = CFG_KEYS.chatSpeechLanguage.key;
|
|
12
13
|
|
|
13
14
|
export interface UseSpeechLanguageResult {
|
|
14
15
|
/** The BCP-47 tag in force. Never empty. */
|