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

会話一覧の最新化 #59

Merged
merged 1 commit into from Sep 4, 2023
Merged

会話一覧の最新化 #59

merged 1 commit into from Sep 4, 2023

Conversation

wadabee
Copy link
Contributor

@wadabee wadabee commented Sep 4, 2023

Issue #, if available:
#41

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Comment on lines +34 to +38
post: (
id: string,
content: string,
mutateListChat: KeyedMutator<ListChatsResponse>
) => void;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ZsutandとSWRの相性問題があり、Zsutandの中でSWRを実行するとエラーになってしまうので、Mutate関数を渡す実装にしました。

Comment on lines +111 to +125
<Markdown>
{message.content +
`${
loading &&
idx === messages.length - 1 &&
messages[idx].content !== ''
? '▍'
: ''
}`}
</Markdown>
{loading &&
message.role === 'assistant' &&
idx === messages.length - 1 && (
<div className="animate-pulse text-2xl text-gray-700">
<PiDotsThree />
</div>
idx === messages.length - 1 &&
messages[idx].content === '' && (
<div className="animate-pulse text-gray-700">▍</div>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Loading表示の修正を入れ忘れていたので、こちらも修正しました。

const getLabelByPath = (path: string) => {
const getLabelByPath = (_path: string) => {
// MEMO: /chat/:chatId の path の場合に件名が表示されないため、以下の実装としている
const path = '/' + _path.split('/')[1];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これそうなんすよねぇ〜自分も気になってました。タイトルが出せると良いのにと。Issue 化しておきます!

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 this pull request may close these issues.

None yet

2 participants