Skip to content

Feat/personalization#7

Merged
aster-void merged 13 commits intomainfrom
feat/personalization
Sep 10, 2025
Merged

Feat/personalization#7
aster-void merged 13 commits intomainfrom
feat/personalization

Conversation

@Kanata844
Copy link
Contributor

No description provided.

Copy link
Contributor

@aster-void aster-void Sep 9, 2025

Choose a reason for hiding this comment

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

selectedChannelId と screenMode は

screenMode = "channel" -> selectedChannelId は必須
screenMode = "personalization" -> selectedChannelId は不要

という関係にあるので、その関連性を反映した型にするといいね

type Selection =
  | {
      type: "chat";
      channelId: Id<"channels">;
  | {
      type: "personalization";
    };

Copy link
Contributor

Choose a reason for hiding this comment

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

これは、文字列ならなんでもとれるわけではなく、 "chat" か "personalization" の二択だと思うので、それを反映した型をつけるといいね

let screenMode = $state<"chat" | "personalization">("chat");

@aster-void aster-void merged commit dc2fe4d into main Sep 10, 2025
3 checks passed
@aster-void aster-void deleted the feat/personalization branch September 10, 2025 06:53
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.

2 participants

Comments