Skip to content

Commit

Permalink
fix: remove shinkai hosting options (#411)
Browse files Browse the repository at this point in the history
* update tools UI

* remove shinkai hosting options

* remove shinkai hosting options

* bump version v0.7.34
  • Loading branch information
paulclindo authored Aug 20, 2024
1 parent 81d9aab commit 2b1adb0
Show file tree
Hide file tree
Showing 7 changed files with 122 additions and 136 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {
Alert,
AlertDescription,
AlertTitle,
TextLink,
Tooltip,
TooltipContent,
TooltipPortal,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,11 @@ import {
CardTitle,
} from '@shinkai_network/shinkai-ui';
import { cn } from '@shinkai_network/shinkai-ui/utils';
import {
ALargeSmall,
BookOpenText,
Database,
Images,
List,
Star,
} from 'lucide-react';
import { BookOpenText, Database, List, Star } from 'lucide-react';
import { useState } from 'react';
import AutoSizer from 'react-virtualized-auto-sizer';

import {
OLLAMA_MODELS,
OllamaModelCapability,
} from '../../lib/shinkai-node-manager/ollama-models';
import { OLLAMA_MODELS } from '../../lib/shinkai-node-manager/ollama-models';
import {
useShinkaiNodeGetDefaultModel,
useShinkaiNodeIsRunningQuery,
Expand Down Expand Up @@ -81,78 +71,74 @@ export const OllamaModels = () => {
<div className="flex w-full flex-row flex-wrap items-center justify-center gap-2">
{OLLAMA_MODELS.map((model) => {
return (
<>
<Card
className="grid h-[500px] w-[260px] grid-flow-row"
key={model.fullName}
>
<CardHeader className="">
<CardTitle className="text-md">
<span>{model.name}</span>
</CardTitle>
<div className="mt-2 h-[40px]">
{isDefaultModel(model.fullName) && (
<Badge
className={cn(
'rounded-md border-0 px-2 py-1 font-normal capitalize',
'bg-emerald-900 text-emerald-400',
)}
variant="outline"
>
{t('common.recommended')}
</Badge>
)}
</div>
<CardDescription className="h-full overflow-hidden text-ellipsis">
{model.description}
</CardDescription>
</CardHeader>
<CardContent className="flex flex-col space-y-1 text-xs">
<div className="flex h-[75px] flex-col space-y-1">
{model.capabilities.map((capability) => (
<ModelCapabilityTag
capability={capability}
key={capability}
/>
))}
</div>
<div className="pb-2 pt-0">
<Separator />
</div>
<ModelQuailityTag quality={model.quality} />
<ModelSpeedTag speed={model.speed} />
<Badge
className={cn(
'justify-center rounded-full px-2 py-1 font-normal capitalize',
)}
variant="outline"
>
<BookOpenText className="h-4 w-4" />
<span className="ml-2 overflow-hidden text-ellipsis">
{t('shinkaiNode.models.labels.bookPages', {
pages: Math.round(
(model.contextLength * 0.75) / 380,
),
})}
</span>
</Badge>
<Badge
className={cn(
'justify-center rounded-full px-2 py-1 font-normal capitalize',
)}
variant="outline"
>
<Database className="mr-2 h-4 w-4" />
<span className="ml-2 overflow-hidden text-ellipsis">
{model.size} GB
</span>
</Badge>
</CardContent>
<CardFooter className="flex h-[75px] flex-row items-center justify-center">
<OllamaModelInstallButton model={model.fullName} />
</CardFooter>
</Card>
</>
<Card
className="grid h-[500px] w-[260px] grid-flow-row"
key={model.fullName}
>
<CardHeader className="">
<CardTitle className="text-md">
<span>{model.name}</span>
</CardTitle>
<div className="mt-2 h-[40px]">
{isDefaultModel(model.fullName) && (
<Badge
className={cn(
'rounded-md border-0 px-2 py-1 font-normal capitalize',
'bg-emerald-900 text-emerald-400',
)}
variant="outline"
>
{t('common.recommended')}
</Badge>
)}
</div>
<CardDescription className="h-full overflow-hidden text-ellipsis">
{model.description}
</CardDescription>
</CardHeader>
<CardContent className="flex flex-col space-y-1 text-xs">
<div className="flex h-[75px] flex-col space-y-1">
{model.capabilities.map((capability) => (
<ModelCapabilityTag
capability={capability}
key={capability}
/>
))}
</div>
<div className="pb-2 pt-0">
<Separator />
</div>
<ModelQuailityTag quality={model.quality} />
<ModelSpeedTag speed={model.speed} />
<Badge
className={cn(
'justify-center rounded-full px-2 py-1 font-normal capitalize',
)}
variant="outline"
>
<BookOpenText className="h-4 w-4" />
<span className="ml-2 overflow-hidden text-ellipsis">
{t('shinkaiNode.models.labels.bookPages', {
pages: Math.round((model.contextLength * 0.75) / 380),
})}
</span>
</Badge>
<Badge
className={cn(
'justify-center rounded-full px-2 py-1 font-normal capitalize',
)}
variant="outline"
>
<Database className="mr-2 h-4 w-4" />
<span className="ml-2 overflow-hidden text-ellipsis">
{model.size} GB
</span>
</Badge>
</CardContent>
<CardFooter className="flex h-[75px] flex-row items-center justify-center">
<OllamaModelInstallButton model={model.fullName} />
</CardFooter>
</Card>
);
})}
</div>
Expand Down
46 changes: 23 additions & 23 deletions apps/shinkai-desktop/src/pages/get-started.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ import {
} from '@shinkai_network/shinkai-node-state/forms/auth/quick-connection';
import { useSubmitRegistrationNoCode } from '@shinkai_network/shinkai-node-state/lib/mutations/submitRegistation/useSubmitRegistrationNoCode';
import { useGetEncryptionKeys } from '@shinkai_network/shinkai-node-state/lib/queries/getEncryptionKeys/useGetEncryptionKeys';
import { Button, buttonVariants, Separator } from '@shinkai_network/shinkai-ui';
import { Button } from '@shinkai_network/shinkai-ui';
import { submitRegistrationNoCodeError } from '@shinkai_network/shinkai-ui/helpers';
import { cn } from '@shinkai_network/shinkai-ui/utils';
import { useState } from 'react';
import { useForm } from 'react-hook-form';
import { Link, useNavigate } from 'react-router-dom';
Expand Down Expand Up @@ -113,11 +112,11 @@ const GetStartedPage = () => {
onRestore={() => onRestoreConfirmation()}
open={resetStorageBeforeConnectConfirmationPromptOpen}
/>
<div className="mx-auto flex h-full max-w-lg flex-col">
<div className="mx-auto flex h-full max-w-md flex-col gap-14">
<p className="text-gray-80 text-center text-base tracking-wide">
{t('desktop.welcome')} <span aria-hidden> 🔑</span>
</p>
<div className="mt-10 flex flex-1 flex-col gap-10">
<div className="flex flex-1 flex-col gap-4">
<div className="space-y-4">
<Button
className="w-full"
Expand All @@ -133,26 +132,27 @@ const GetStartedPage = () => {
</Button>
<ResourcesBanner />
</div>
<Separator className="relative" decorative>
<span className="absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 bg-gray-500 p-2 text-gray-100">
or
</span>
</Separator>
{/*<Separator className="relative" decorative>*/}
{/* <span className="absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 bg-gray-500 p-2 text-gray-100">*/}
{/* or*/}
{/* </span>*/}
{/*</Separator>*/}
<div className="space-y-4">
<a
className={cn(
buttonVariants({
variant: 'ghost',
size: 'lg',
}),
'w-full',
)}
href="https://www.shinkai.com/sign-in"
rel="noreferrer"
target="_blank"
>
{t('common.logInShinkaiHosting')}
</a>
{/* Disable Shinkai Hosting */}
{/*<a*/}
{/* className={cn(*/}
{/* buttonVariants({*/}
{/* variant: 'ghost',*/}
{/* size: 'lg',*/}
{/* }),*/}
{/* 'w-full',*/}
{/* )}*/}
{/* href="https://www.shinkai.com/sign-in"*/}
{/* rel="noreferrer"*/}
{/* target="_blank"*/}
{/*>*/}
{/* {t('common.logInShinkaiHosting')}*/}
{/*</a>*/}
{/*<a*/}
{/* className={cn(*/}
{/* buttonVariants({*/}
Expand Down
2 changes: 1 addition & 1 deletion apps/shinkai-desktop/src/pages/tools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const Tools = () => {
</Button>
)}
</div>
<div className="grid grid-cols-2 gap-4">
<div className="grid grid-cols-1 gap-4">
{(isPending || !isSearchQuerySynced || isSearchToolListPending) &&
Array.from({ length: 8 }).map((_, idx) => (
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,30 +173,31 @@ export const ConnectMethodQuickStart = () => {
</Button>
</form>
</Form>
<div className="text-gray-80 space-y-4 py-8 pt-12 text-center text-sm">
{/*<p>*/}
{/* Don’t have an account?{' '}*/}
{/* <a*/}
{/* className="font-semibold text-white underline"*/}
{/* href="https://www.shinkai.com/sign-up"*/}
{/* rel="noreferrer"*/}
{/* target={'_blank'}*/}
{/* >*/}
{/* Sign up*/}
{/* </a>*/}
{/*</p>*/}
<p>
Already have an account?{' '}
<a
className="font-semibold text-white underline"
href="https://www.shinkai.com/user"
rel="noreferrer"
target={'_blank'}
>
Click here to connect
</a>
</p>
</div>
{/* Disable shinkai hosting */}
{/*<div className="text-gray-80 space-y-4 py-8 pt-12 text-center text-sm">*/}
{/*<p>*/}
{/* Don’t have an account?{' '}*/}
{/* <a*/}
{/* className="font-semibold text-white underline"*/}
{/* href="https://www.shinkai.com/sign-up"*/}
{/* rel="noreferrer"*/}
{/* target={'_blank'}*/}
{/* >*/}
{/* Sign up*/}
{/* </a>*/}
{/*</p>*/}
{/* <p>*/}
{/* Already have an account?{' '}*/}
{/* <a*/}
{/* className="font-semibold text-white underline"*/}
{/* href="https://www.shinkai.com/user"*/}
{/* rel="noreferrer"*/}
{/* target={'_blank'}*/}
{/* >*/}
{/* Click here to connect*/}
{/* </a>*/}
{/* </p>*/}
{/*</div>*/}
</div>

<div className="flex gap-4">
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shinkai/source",
"version": "0.7.33",
"version": "0.7.34",
"license": "SEE LICENSE IN LICENSE",
"files": [
"LICENSE"
Expand Down

0 comments on commit 2b1adb0

Please sign in to comment.