Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composer attachment not present #1158

Closed
utkarsh-alpuria opened this issue Nov 12, 2024 · 2 comments · Fixed by #1159
Closed

Composer attachment not present #1158

utkarsh-alpuria opened this issue Nov 12, 2024 · 2 comments · Fixed by #1159

Comments

@utkarsh-alpuria
Copy link

Tried following the composer.attachments in dcomposition section of the documentation
LINK - https://www.assistant-ui.com/docs/ui/styled/Decomposition#composer

ERROR: '"@assistant-ui/react"' has no exported member named 'ComposerAttachment'. Did you mean 'CompleteAttachment'?
CODE:
import { FC } from "react";
import { Composer, ThreadPrimitive } from "@assistant-ui/react";

import { ComposerAttachment } from "@assistant-ui/react";

const MyComposerAttachment: FC = () => {
return (
<ComposerAttachment.Root>
attachment
<ComposerAttachment.Remove />
</ComposerAttachment.Root>
);
};

export const MyComposer: FC = () => {
return (
<Composer.Root>
<Composer.Attachments />
<Composer.AddAttachment />
<Composer.Input autoFocus />
<Composer.Action />
</Composer.Root>
);
};

Initially tried ThreadWelcome.Message and ThreadWelcome.suggestions, it worked but not exactly how it was mentioned in the documentation

VERSIONS USING
"@assistant-ui/react": "^0.7.0",
"@assistant-ui/react-markdown": "^0.7.0",

FILE STRUCTURE IMAGE
Composer_attachments_error

@Yonom
Copy link
Member

Yonom commented Nov 12, 2024

Thanks a lot for reporting this, ComposerAttachment was renamed to AttachmentUI because it is also used for MessageAttachments

@Yonom
Copy link
Member

Yonom commented Nov 12, 2024

I opened this issue to track the progress towards making AttachmentUI's decomposition have feature parity with the default UI

#1160

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants