Skip to content
This repository was archived by the owner on Jan 2, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 10 additions & 0 deletions client/src/Project/CurrentTabContent/Header/TabButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ type Props = TabType & {
studioId?: string;
initialRanges?: [number, number][];
isFileInContext?: boolean;
isDocInContext?: boolean;
initialSections?: string[];
conversationId?: string;
initialQuery?: {
path: string;
Expand Down Expand Up @@ -77,7 +79,9 @@ const TabButton = ({
isTemp,
studioId,
initialRanges,
initialSections,
isFileInContext,
isDocInContext,
conversationId,
initialQuery,
relativeUrl,
Expand Down Expand Up @@ -167,7 +171,9 @@ const TabButton = ({
tokenRange,
studioId,
initialRanges,
initialSections,
isFileInContext,
isDocInContext,
conversationId,
initialQuery,
favicon,
Expand Down Expand Up @@ -205,7 +211,9 @@ const TabButton = ({
tokenRange,
studioId,
initialRanges,
initialSections,
isFileInContext,
isDocInContext,
conversationId,
initialQuery,
docId,
Expand All @@ -224,7 +232,9 @@ const TabButton = ({
title,
studioId,
initialRanges,
initialSections,
isFileInContext,
isDocInContext,
conversationId,
initialQuery,
]);
Expand Down
2 changes: 1 addition & 1 deletion client/src/Project/CurrentTabContent/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const ProjectHeader = ({ side }: Props) => {
>
{tabs.map(({ key, ...t }, i) => (
<TabButton
key={key}
key={`${t.type}-${key}`}
{...t}
tabKey={key}
isActive={tab?.key === key}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ const StudioSubItem = ({
isFileInContext: true,
initialRanges: ranges?.map((r) => [r.start, r.end]),
});
} else if (docId && relativeUrl) {
} else if (docId) {
openNewTab({
type: TabTypesEnum.DOC,
studioId,
title: docTitle,
relativeUrl,
relativeUrl: relativeUrl || '',
docId,
favicon: docFavicon,
isDocInContext: true,
Expand Down
8 changes: 4 additions & 4 deletions client/src/Project/LeftSidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,16 @@ const LeftSidebar = ({}: Props) => {
className="h-full relative z-10 min-w-[204px] flex-shrink-0 overflow-hidden flex flex-col"
ref={panelRef}
>
<div className="w-ful flex gap-4 hover:bg-bg-base-hover border-b border-bg-border h-10">
<div className="w-ful flex gap-4 hover:bg-bg-base-hover border-b border-bg-border h-10 overflow-hidden">
{os.type === 'Darwin' ? <span className="w-16 flex-shrink-0" /> : ''}
<Dropdown
DropdownComponent={ProjectsDropdown}
dropdownPlacement="bottom-start"
containerClassName="flex-1"
containerClassName="flex-1 overflow-hidden"
appendTo={document.body}
>
<div className="flex-1 flex px-4 items-center text-left h-10 gap-4 border-r border-bg-border">
<p className="flex-1 body-s-b">
<div className="flex-1 flex px-4 items-center text-left h-10 gap-4 border-r border-bg-border overflow-hidden">
<p className="flex-1 body-s-b ellipsis">
{project?.name || 'Default project'}
</p>
<ChevronDownIcon raw sizeClassName="w-3.5 h-3.5" />
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ const Header = ({ type = 'default' }: Props) => {
DropdownComponent={ProjectsDropdown}
dropdownPlacement="bottom-start"
>
<div className="flex px-4 items-center text-left h-10 gap-4 border-r border-bg-border hover:bg-bg-base-hover">
<p className="flex-1 body-s-b">
<div className="flex px-4 items-center text-left h-10 gap-4 border-r border-bg-border hover:bg-bg-base-hover ellipsis">
<p className="flex-1 body-s-b ellipsis">
{project?.name || 'Default project'}
</p>
<ChevronDownIcon raw sizeClassName="w-3.5 h-3.5" />
Expand Down
4 changes: 2 additions & 2 deletions client/src/context/providers/TabsContextProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const TabsContextProvider = ({ children }: PropsWithChildren<Props>) => {
: {
...data,
type: TabTypesEnum.DOC,
key: data.docId + data.relativeUrl,
key: 'doc-' + data.docId + data.relativeUrl,
};
if (newTab.type === TabTypesEnum.FILE) {
updateArrayInStorage(
Expand All @@ -139,7 +139,7 @@ const TabsContextProvider = ({ children }: PropsWithChildren<Props>) => {
newTab.type === TabTypesEnum.CHAT && newTab.conversationId
? t.type === TabTypesEnum.CHAT &&
t.conversationId === newTab.conversationId
: t.key === newTab.key ||
: (t.key === newTab.key && t.type === newTab.type) ||
(t.type === TabTypesEnum.FILE && t.isTemp),
);
if (!previousTab) {
Expand Down
3 changes: 2 additions & 1 deletion client/src/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -507,5 +507,6 @@
"In this project": "In questo progetto",
"Existing studio conversations": "Conversazioni in studio esistenti",
"Select section": "Seleziona la sezione",
"Clear section": "Pulisci sezione"
"Clear section": "Pulisci sezione",
"Let’s get you started with bloop!": "Ti cominciamo con Bloop!"
}