feat(app): add prompt input story (#32308)
This commit is contained in:
parent
3e523d506c
commit
d37ddc501c
15 changed files with 501 additions and 228 deletions
|
|
@ -12,7 +12,7 @@ import { useLanguage } from "@/context/language"
|
|||
import { useLayout } from "@/context/layout"
|
||||
import { useLocal } from "@/context/local"
|
||||
import { usePermission } from "@/context/permission"
|
||||
import { type ContextItem, type ImageAttachmentPart, type Prompt, usePrompt } from "@/context/prompt"
|
||||
import { type ContextItem, type ImageAttachmentPart, type Prompt, type usePrompt } from "@/context/prompt"
|
||||
import { useSDK, type DirectorySDK } from "@/context/sdk"
|
||||
import { useSync, type DirectorySync } from "@/context/sync"
|
||||
import { Identifier } from "@/utils/id"
|
||||
|
|
@ -174,6 +174,7 @@ export async function sendFollowupDraft(input: FollowupSendInput) {
|
|||
}
|
||||
|
||||
type PromptSubmitInput = {
|
||||
prompt: ReturnType<typeof usePrompt>
|
||||
info: Accessor<{ id: string } | undefined>
|
||||
imageAttachments: Accessor<ImageAttachmentPart[]>
|
||||
commentCount: Accessor<number>
|
||||
|
|
@ -211,7 +212,7 @@ export function createPromptSubmit(input: PromptSubmitInput) {
|
|||
const serverSync = useServerSync()
|
||||
const local = useLocal()
|
||||
const permission = usePermission()
|
||||
const prompt = usePrompt()
|
||||
const prompt = input.prompt
|
||||
const layout = useLayout()
|
||||
const language = useLanguage()
|
||||
const params = useParams()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue