feat(id): brand PartID through Drizzle and Zod schemas (#16966)
This commit is contained in:
@@ -9,8 +9,7 @@ import { EmptyBorder } from "@tui/component/border"
|
||||
import { useSDK } from "@tui/context/sdk"
|
||||
import { useRoute } from "@tui/context/route"
|
||||
import { useSync } from "@tui/context/sync"
|
||||
import { Identifier } from "@/id/id"
|
||||
import { MessageID } from "@/session/schema"
|
||||
import { MessageID, PartID } from "@/session/schema"
|
||||
import { createStore, produce } from "solid-js/store"
|
||||
import { useKeybind } from "@tui/context/keybind"
|
||||
import { usePromptHistory, type PromptInfo } from "./history"
|
||||
@@ -625,7 +624,7 @@ export function Prompt(props: PromptProps) {
|
||||
parts: nonTextParts
|
||||
.filter((x) => x.type === "file")
|
||||
.map((x) => ({
|
||||
id: Identifier.ascending("part"),
|
||||
id: PartID.ascending(),
|
||||
...x,
|
||||
})),
|
||||
})
|
||||
@@ -640,12 +639,12 @@ export function Prompt(props: PromptProps) {
|
||||
variant,
|
||||
parts: [
|
||||
{
|
||||
id: Identifier.ascending("part"),
|
||||
id: PartID.ascending(),
|
||||
type: "text",
|
||||
text: inputText,
|
||||
},
|
||||
...nonTextParts.map((x) => ({
|
||||
id: Identifier.ascending("part"),
|
||||
id: PartID.ascending(),
|
||||
...x,
|
||||
})),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user