Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: add sliding container chat view with session management
- Add sliding container component for playground panel
- Integrate chat header with session rename, delete, and message logs
- Add session sidebar in fullscreen mode
- Implement session fetching and management
- Add rename functionality with optimistic updates
- Fix sessionStorage JSON parsing bug in use-rename-session and use-put-update-messages
- Comment out IOModal to test sliding container (will be reverted before merge)
- Add basic tests for sliding container components
  • Loading branch information
Olfa Maslah authored and Olfa Maslah committed Nov 30, 2025
commit d2a4ac7ad26da305b0b81c3a643bc0bf80843008
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import ForwardedIconComponent from "@/components/common/genericIconComponent";
import ShadTooltip from "@/components/common/shadTooltipComponent";
import { PLAYGROUND_BUTTON_NAME } from "@/constants/constants";
import { CustomIOModal } from "@/customization/components/custom-new-modal";
import { PlaygroundButtonSliding } from "@/customization/components/custom-playground-button-sliding";
// Will be reverted before merging this PR - IOModal commented out to test sliding container
// import { CustomIOModal } from "@/customization/components/custom-new-modal";
import { ENABLE_PUBLISH } from "@/customization/feature-flags";

interface PlaygroundButtonProps {
Expand Down Expand Up @@ -49,22 +51,26 @@ const PlaygroundButton = ({
setOpen,
canvasOpen,
}: PlaygroundButtonProps) => {
return hasIO ? (
<CustomIOModal
open={open}
setOpen={setOpen}
disable={!hasIO}
canvasOpen={canvasOpen}
>
<ActiveButton />
</CustomIOModal>
) : (
<ShadTooltip content="Add a Chat Input or Chat Output to use the playground">
<div>
<DisabledButton />
</div>
</ShadTooltip>
);
// Will be reverted before merging this PR - IOModal commented out to test sliding container
// return hasIO ? (
// <CustomIOModal
// open={open}
// setOpen={setOpen}
// disable={!hasIO}
// canvasOpen={canvasOpen}
// >
// <ActiveButton />
// </CustomIOModal>
// ) : (
// <ShadTooltip content="Add a Chat Input or Chat Output to use the playground">
// <div>
// <DisabledButton />
// </div>
// </ShadTooltip>
// );

// New sliding container implementation for testing
return <PlaygroundButtonSliding hasIO={hasIO} />;
};

export default PlaygroundButton;
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import React from "react";
import ForwardedIconComponent from "@/components/common/genericIconComponent";

interface ChatHeaderActionsProps {
onNewChat?: () => void;
}

export function ChatHeaderActions({ onNewChat }: ChatHeaderActionsProps) {
if (!onNewChat) return null;

return (
<div className="flex items-center gap-2">
<button
onClick={onNewChat}
className="p-2 hover:bg-accent rounded transition-colors"
aria-label="New chat"
>
<ForwardedIconComponent name="Plus" className="h-4 w-4" />
</button>
</div>
);
}
Loading