Merge pull request #1186 from MODSetter/dev_mod

chore: various fixes
This commit is contained in:
Rohan Verma 2026-04-08 16:22:29 -07:00 committed by GitHub
commit edd226ccc1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 4301 additions and 4281 deletions

View file

@ -1 +1 @@
0.0.14
0.0.15

View file

@ -1,6 +1,6 @@
[project]
name = "surf-new-backend"
version = "0.0.14"
version = "0.0.15"
description = "SurfSense Backend"
requires-python = ">=3.12"
dependencies = [

8455
surfsense_backend/uv.lock generated

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
{
"name": "surfsense_browser_extension",
"displayName": "Surfsense Browser Extension",
"version": "0.0.14",
"version": "0.0.15",
"description": "Extension to collect Browsing History for SurfSense.",
"author": "https://github.com/MODSetter",
"engines": {

View file

@ -1,6 +1,6 @@
{
"name": "surfsense-desktop",
"version": "0.0.14",
"version": "0.0.15",
"description": "SurfSense Desktop App",
"main": "dist/main.js",
"scripts": {

View file

@ -40,9 +40,48 @@ import { ThinkingStepsDataUI } from "@/components/assistant-ui/thinking-steps";
import { Thread } from "@/components/assistant-ui/thread";
import { useChatSessionStateSync } from "@/hooks/use-chat-session-state";
import { useMessagesSync } from "@/hooks/use-messages-sync";
import { documentsApiService } from "@/lib/apis/documents-api.service";
import { getBearerToken } from "@/lib/auth-utils";
import { convertToThreadMessage } from "@/lib/chat/message-utils";
import {
isPodcastGenerating,
looksLikePodcastRequest,
setActivePodcastTaskId,
} from "@/lib/chat/podcast-state";
import {
addToolCall,
appendText,
buildContentForPersistence,
buildContentForUI,
type ContentPartsState,
FrameBatchedUpdater,
readSSEStream,
type ThinkingStepData,
updateThinkingSteps,
updateToolCall,
} from "@/lib/chat/streaming-state";
import {
appendMessage,
createThread,
getRegenerateUrl,
getThreadFull,
getThreadMessages,
type ThreadRecord,
} from "@/lib/chat/thread-persistence";
import { NotFoundError } from "@/lib/error";
import {
trackChatCreated,
trackChatError,
trackChatMessageSent,
trackChatResponseReceived,
} from "@/lib/posthog/events";
import Loading from "../loading";
const MobileEditorPanel = dynamic(
() =>
import("@/components/editor-panel/editor-panel").then((m) => ({
default: m.MobileEditorPanel,
})),
() =>
import("@/components/editor-panel/editor-panel").then((m) => ({
default: m.MobileEditorPanel,
@ -50,6 +89,10 @@ const MobileEditorPanel = dynamic(
{ ssr: false }
);
const MobileHitlEditPanel = dynamic(
() =>
import("@/components/hitl-edit-panel/hitl-edit-panel").then((m) => ({
default: m.MobileHitlEditPanel,
})),
() =>
import("@/components/hitl-edit-panel/hitl-edit-panel").then((m) => ({
default: m.MobileHitlEditPanel,
@ -57,6 +100,10 @@ const MobileHitlEditPanel = dynamic(
{ ssr: false }
);
const MobileReportPanel = dynamic(
() =>
import("@/components/report-panel/report-panel").then((m) => ({
default: m.MobileReportPanel,
})),
() =>
import("@/components/report-panel/report-panel").then((m) => ({
default: m.MobileReportPanel,

View file

@ -346,15 +346,11 @@ export default function SuggestionPage() {
needsTruncation && !isExpanded ? option.slice(0, TRUNCATE_LENGTH) + "…" : option;
return (
<div
<button
type="button"
key={index}
role="button"
tabIndex={0}
className="suggestion-option"
onClick={() => handleSelect(option)}
onKeyDown={(e) => {
if (e.key === "Enter") handleSelect(option);
}}
>
<span className="option-number">{index + 1}</span>
<span className="option-text">{displayText}</span>
@ -370,7 +366,7 @@ export default function SuggestionPage() {
{isExpanded ? "less" : "more"}
</button>
)}
</div>
</button>
);
})}
</div>

View file

@ -1,3 +1,5 @@
"use client";
import type { Separator } from "fumadocs-core/page-tree";
export function SidebarSeparator({ item }: { item: Separator }) {

View file

@ -151,13 +151,6 @@ const MobileNav = ({ navItems, isScrolled, scrolledBgClassName }: any) => {
"bg-white/80 backdrop-blur-md border border-white/20 shadow-lg dark:bg-neutral-950/80 dark:border-neutral-800/50")
: "bg-transparent border border-transparent"
)}
className={cn(
"relative mx-auto flex w-full max-w-[calc(100vw-2rem)] flex-col items-center justify-between px-4 py-2 lg:hidden transition-all duration-300",
isScrolled
? (scrolledBgClassName ??
"bg-white/80 backdrop-blur-md border border-white/20 shadow-lg dark:bg-neutral-950/80 dark:border-neutral-800/50")
: "bg-transparent border border-transparent"
)}
>
<div className="flex w-full flex-row items-center justify-between">
<Link

View file

@ -91,12 +91,12 @@ export function SidebarSlideOutPanel({
{/* Panel extending from sidebar's right edge, flush with the wrapper border */}
<motion.div
initial={{ width: 0 }}
animate={{ width }}
exit={{ width: 0 }}
style={{ width, left: "100%", top: -1, bottom: -1 }}
initial={{ x: -width }}
animate={{ x: 0 }}
exit={{ x: -width }}
transition={{ type: "tween", duration: 0.2, ease: [0.4, 0, 0.2, 1] }}
className="absolute z-20 overflow-hidden"
style={{ left: "100%", top: -1, bottom: -1 }}
>
<div
style={{ width }}

View file

@ -64,7 +64,8 @@ export function ChatShareButton({ thread, onVisibilityChange, className }: ChatS
// Permission check for public sharing
const { data: access } = useAtomValue(myAccessAtom);
const canCreatePublicLink =
!!access && (access.is_owner || (access.permissions?.includes("public_sharing:create") ?? false));
!!access &&
(access.is_owner || (access.permissions?.includes("public_sharing:create") ?? false));
// Query to check if thread has public snapshots
const { data: snapshotsData } = useQuery({

View file

@ -8,7 +8,7 @@ const demoPlans = [
price: "0",
yearlyPrice: "0",
period: "",
billingText: "1,000 pages included",
billingText: "500 pages included",
features: [
"Self Hostable",
"500 pages included to start",

View file

@ -47,7 +47,8 @@ export function PublicChatSnapshotsManager({
!!access && (access.is_owner || (access.permissions?.includes("public_sharing:view") ?? false));
const canDelete =
!!access && (access.is_owner || (access.permissions?.includes("public_sharing:delete") ?? false));
!!access &&
(access.is_owner || (access.permissions?.includes("public_sharing:delete") ?? false));
// Mutations
const { mutateAsync: deleteSnapshot } = useAtomValue(deletePublicChatSnapshotMutationAtom);

View file

@ -79,9 +79,11 @@ export function ImageModelManager({ searchSpaceId }: ImageModelManagerProps) {
const { data: access } = useAtomValue(myAccessAtom);
const canCreate =
!!access && (access.is_owner || (access.permissions?.includes("image_generations:create") ?? false));
!!access &&
(access.is_owner || (access.permissions?.includes("image_generations:create") ?? false));
const canDelete =
!!access && (access.is_owner || (access.permissions?.includes("image_generations:delete") ?? false));
!!access &&
(access.is_owner || (access.permissions?.includes("image_generations:delete") ?? false));
const canUpdate = canCreate;
const isReadOnly = !canCreate && !canDelete;

View file

@ -89,9 +89,12 @@ export function ModelConfigManager({ searchSpaceId }: ModelConfigManagerProps) {
// Permissions
const { data: access } = useAtomValue(myAccessAtom);
const canCreate = !!access && (access.is_owner || (access.permissions?.includes("llm_configs:create") ?? false));
const canUpdate = !!access && (access.is_owner || (access.permissions?.includes("llm_configs:update") ?? false));
const canDelete = !!access && (access.is_owner || (access.permissions?.includes("llm_configs:delete") ?? false));
const canCreate =
!!access && (access.is_owner || (access.permissions?.includes("llm_configs:create") ?? false));
const canUpdate =
!!access && (access.is_owner || (access.permissions?.includes("llm_configs:update") ?? false));
const canDelete =
!!access && (access.is_owner || (access.permissions?.includes("llm_configs:delete") ?? false));
const isReadOnly = !canCreate && !canUpdate && !canDelete;
// Local state

View file

@ -341,19 +341,12 @@ export function DocumentUploadTab({
</button>
)
) : (
<div
role="button"
tabIndex={0}
<button
type="button"
className="flex flex-col items-center gap-4 py-12 px-4 cursor-pointer w-full bg-transparent border-none"
onClick={() => {
if (!isElectron) fileInputRef.current?.click();
}}
onKeyDown={(e) => {
if (e.key === "Enter" || e.key === " ") {
e.preventDefault();
if (!isElectron) fileInputRef.current?.click();
}
}}
>
<Upload className="h-10 w-10 text-muted-foreground" />
<div className="text-center space-y-1.5">
@ -362,15 +355,14 @@ export function DocumentUploadTab({
</p>
<p className="text-sm text-muted-foreground">{t("file_size_limit")}</p>
</div>
<div
className="w-full mt-1"
<fieldset
className="w-full mt-1 border-none p-0 m-0"
onClick={(e) => e.stopPropagation()}
onKeyDown={(e) => e.stopPropagation()}
role="group"
>
{renderBrowseButton({ fullWidth: true })}
</div>
</div>
</fieldset>
</button>
)}
</div>

View file

@ -1,6 +1,6 @@
{
"name": "surfsense_web",
"version": "0.0.14",
"version": "0.0.15",
"private": true,
"description": "SurfSense Frontend",
"scripts": {