iris-chatbot 0.2.4 → 0.2.5
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 +1 -1
- package/template/next-env.d.ts +6 -0
- package/template/package.json +1 -1
- package/template/src/app/api/local-sync/route.ts +1 -1
- package/template/src/app/layout.tsx +1 -1
- package/template/src/components/SettingsModal.tsx +1 -1
- package/template/src/lib/db.ts +3 -3
- package/template/src/lib/tooling/approvals.ts +4 -4
- package/template/src/lib/types.ts +1 -1
- package/template/src/lib/utils.ts +1 -1
package/package.json
CHANGED
package/template/package.json
CHANGED
|
@@ -913,7 +913,7 @@ export default function SettingsModal({
|
|
|
913
913
|
className="h-24 w-full rounded-lg border border-[var(--border)] bg-[var(--panel)] px-3 py-2 text-xs"
|
|
914
914
|
value={allowedRootsText}
|
|
915
915
|
onChange={(event) => setAllowedRootsText(event.target.value)}
|
|
916
|
-
placeholder="
|
|
916
|
+
placeholder="~/iris-project ~/Desktop"
|
|
917
917
|
/>
|
|
918
918
|
</div>
|
|
919
919
|
<div className="grid gap-2 md:grid-cols-2">
|
package/template/src/lib/db.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Dexie, { Table } from "dexie";
|
|
2
2
|
import type { MemoryEntry, MessageNode, Settings, Thread, ToolApproval, ToolEvent } from "./types";
|
|
3
3
|
|
|
4
|
-
class
|
|
4
|
+
class IrisDB extends Dexie {
|
|
5
5
|
messages!: Table<MessageNode, string>;
|
|
6
6
|
threads!: Table<Thread, string>;
|
|
7
7
|
settings!: Table<Settings, string>;
|
|
@@ -10,7 +10,7 @@ class ZenithDB extends Dexie {
|
|
|
10
10
|
memories!: Table<MemoryEntry, string>;
|
|
11
11
|
|
|
12
12
|
constructor() {
|
|
13
|
-
super("
|
|
13
|
+
super("iris-chat");
|
|
14
14
|
this.version(1).stores({
|
|
15
15
|
messages: "id, conversationId, parentId, createdAt",
|
|
16
16
|
threads: "id, conversationId, headMessageId, updatedAt",
|
|
@@ -46,4 +46,4 @@ class ZenithDB extends Dexie {
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
export const db = new
|
|
49
|
+
export const db = new IrisDB();
|
|
@@ -12,16 +12,16 @@ type ApprovalStore = {
|
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
declare global {
|
|
15
|
-
var
|
|
15
|
+
var __irisApprovalStore: ApprovalStore | undefined;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
function getApprovalStore(): ApprovalStore {
|
|
19
|
-
if (!globalThis.
|
|
20
|
-
globalThis.
|
|
19
|
+
if (!globalThis.__irisApprovalStore) {
|
|
20
|
+
globalThis.__irisApprovalStore = {
|
|
21
21
|
pendingApprovals: new Map<string, PendingApproval>(),
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
return globalThis.
|
|
24
|
+
return globalThis.__irisApprovalStore;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
export function createApprovalRequest(params?: { timeoutMs?: number }) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ChatCitationSource, MessageNode } from "./types";
|
|
2
2
|
|
|
3
|
-
const SOURCES_MARKER_PREFIX = "\n\n[[
|
|
3
|
+
const SOURCES_MARKER_PREFIX = "\n\n[[IRIS_SOURCES:";
|
|
4
4
|
const SOURCES_MARKER_SUFFIX = "]]";
|
|
5
5
|
|
|
6
6
|
function normalizeCitationSources(input: ChatCitationSource[]): ChatCitationSource[] {
|