8000 Feat/one time token 2 by yzuyr · Pull Request #113 · getgrinta/grinta · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Feat/one time token 2 #113

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

Merged
merged 3 commits into from
May 23, 2025
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
4 changes: 0 additions & 4 deletions apps/extension/src/app.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
import Home from "$pages/home.svelte";
import Chats from "$pages/chats.svelte";
import ChatsHistory from "$pages/chats-history.svelte";
import SignIn from "$pages/sign-in.svelte";
import Profile from "$pages/profile.svelte";
import Settings from "$pages/settings.svelte";
import { appStore } from "$lib/store/app.svelte";
import { tabsStore } from "$lib/store/tabs.svelte";
Expand Down Expand Up @@ -60,8 +58,6 @@
<Route path="/history" component={ChatsHistory} />
<Route path="/chats" component={Chats} />
<Route path="/chats/:id" component={Chats} />
<Route path="/sign-in" component={SignIn} />
<Route path="/profile" component={Profile} />
<Route path="/settings" component={Settings} />
</Router>
</div>
71 changes: 0 additions & 71 deletions apps/extension/src/lib/ax.ts

This file was deleted.

24 changes: 10 additions & 14 deletions apps/extension/src/lib/components/layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
import { authClient } from "$lib/auth";
import { useRsv } from "@ryuz/rsv";
import clsx from "clsx";
import { ListIcon, SparklesIcon, UserIcon } from "lucide-svelte";
import {
ListIcon,
SettingsIcon,
SparklesIcon,
UserIcon,
} from "lucide-svelte";
import type { Snippet } from "svelte";
import { sendMessage } from "webext-bridge/popup";

Expand Down Expand Up @@ -49,20 +54,11 @@
<SparklesIcon size={20} />
</button>
<button
class={clsx({
"dock-active": ["/profile", "/sign-in"].includes(router.path ?? ""),
})}
=> router.navigate(user ? "/profile" : "/sign-in")}
class={clsx({ "dock-active": router.path?.includes("/settings") })}
=> router?.navigate("/settings")}
aria-label="Open Settings"
>
{#if user}
<img
src={`https://meshy.studio/api/mesh/${user.id}?noise=8&sharpen=1&negate=false&gammaIn=2.1&gammaOut=2.2&brightness=100&saturation=100&hue=0&lightness=0&blur=0`}
alt="Avatar"
class="w-6 rounded-full"
/>
{:else}
<UserIcon size={20} />
{/if}
<SettingsIcon size={20} />
</button>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
</ContextMenu.Trigger>
<ContextMenu.Portal>
<ContextMenu.Content>
<ul class="menu menu-sm bg-base-200 rounded-box w-56">
<ul class="menu menu-sm bg-base-300 rounded-box w-56">
<li>
<a >
<PlusIcon size={16} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</ContextMenu.Trigger>
<ContextMenu.Portal>
<ContextMenu.Content>
<ul class="menu menu-sm bg-base-200 rounded-box w-56">
<ul class="menu menu-sm bg-base-300 rounded-box w-56">
<li>
<button >
<XIcon size={16} />
Expand Down
6 changes: 4 additions & 2 deletions apps/extension/src/pages/chats.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,11 @@
</p>
<div class="modal-action">
<form method="dialog">
<button
<a
class="btn btn-primary"
=> router?.navigate("/sign-in")}>Sign In</button
href="https://getgrinta.com/sign-in"
target="_blank"
rel="noopener noreferrer">Sign In</a
>
<button class="btn" => router?.navigate("/")}
>Go Back</button
Expand Down
32 changes: 23 additions & 9 deletions apps/extension/src/pages/home.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
PlusIcon,
SearchIcon,
SettingsIcon,
UserIcon,
XIcon,
} from "lucide-svelte";
import Layout from "$lib/components/layout.svelte";
Expand All @@ -22,6 +23,8 @@
import colors from "tailwindcss/colors";
import SpaceColorPicker from "$lib/components/space-color-picker.svelte";
import pDebounce from "p-debounce";
import { authClient } from "$lib/auth";
import clsx from "clsx";

const router = useRsv();
let mode = $state<"tabs" | "search" | "editing">("tabs");
Expand Down Expand Up @@ -53,6 +56,7 @@
}, 1);
}

const session = authClient.useSession();
const currentTab = $derived(tabsStore.tabs.find((tab) => tab.active));
const currentSpaceTitle = $derived(tabsStore.currentSpace?.title);
const currentSpaceEssentials = $derived(
Expand All @@ -63,9 +67,7 @@
(group) => group.id === tabsStore.currentSpaceId,
),
);
const hex = $derived(
colors[tabsStore.currentSpace?.color as never]?.[500] ?? colors.gray[500],
);
const user = $derived($session.data?.user);

const spaceTabs = $derived(
tabsStore.tabs.filter((tab) => tab.groupId === tabsStore.currentSpaceId),
Expand Down Expand Up @@ -307,18 +309,30 @@
{/snippet}
{#snippet addon()}
{#if mode === "tabs"}
<button
class="btn btn-ghost btn-sm btn-square"
=> router?.navigate("/settings")}
>
<SettingsIcon size={20} />
& 9E88 lt;/button>
<button
class="btn btn-ghost btn-sm btn-square"
>
>
<SearchIcon size={20} />
</button>
<a
class="btn btn-ghost btn-sm btn-square"
href={user
? "https://getgrinta.com/account"
: "https://getgrinta.com/sign-in"}
target="_blank"
rel="noopener noreferrer"
>
{#if user}
<img
src={`https://meshy.studio/api/mesh/${user.id}?noise=8&sharpen=1&negate=false&gammaIn=2.1&gammaOut=2.2&brightness=100&saturation=100&hue=0&lightness=0&blur=0`}
alt="Avatar"
class="w-6 rounded-full"
/>
{:else}
<UserIcon size={20} />
{/if}
</a>
{:else if mode === "search"}
<button
class="btn btn-ghost btn-sm btn-square"
Expand Down
157 changes: 0 additions & 157 deletions apps/extension/src/pages/profile.svelte

This file was deleted.

Loading
0