Skip to content

Commit

Permalink
Merge branch 'alpha' into dependabot/npm_and_yarn/apps/template/svelt…
Browse files Browse the repository at this point in the history
…ejs/adapter-vercel-5.1.0
  • Loading branch information
eksno authored Feb 27, 2024
2 parents 13b5ad1 + ecd830d commit cbe612b
Show file tree
Hide file tree
Showing 621 changed files with 20,347 additions and 4,939 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/dependabot-auto-approve.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Dependabot auto-approve
on: pull_request_target

permissions:
contents: write
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.6.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
22 changes: 11 additions & 11 deletions apps/aitino/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
module.exports = {
root: true,
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:svelte/recommended',
'prettier'
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:svelte/recommended",
"prettier"
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
parserOptions: {
sourceType: 'module',
sourceType: "module",
ecmaVersion: 2020,
extraFileExtensions: ['.svelte']
extraFileExtensions: [".svelte"]
},
env: {
browser: true,
Expand All @@ -21,10 +21,10 @@ module.exports = {
},
overrides: [
{
files: ['*.svelte'],
parser: 'svelte-eslint-parser',
files: ["*.svelte"],
parser: "svelte-eslint-parser",
parserOptions: {
parser: '@typescript-eslint/parser'
parser: "@typescript-eslint/parser"
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion apps/aitino/.prettierrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"useTabs": true,
"singleQuote": true,
"singleQuote": false,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
Expand Down
26 changes: 13 additions & 13 deletions apps/aitino/components.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"$schema": "https://shadcn-svelte.com/schema.json",
"style": "default",
"tailwind": {
"config": "tailwind.config.js",
"css": "src/app.pcss",
"baseColor": "slate"
},
"aliases": {
"components": "$lib/components",
"utils": "$lib/utils"
},
"typescript": true
}
"$schema": "https://shadcn-svelte.com/schema.json",
"style": "default",
"tailwind": {
"config": "tailwind.config.js",
"css": "src/app.pcss",
"baseColor": "slate"
},
"aliases": {
"components": "$lib/components",
"utils": "$lib/utils"
},
"typescript": true
}
14 changes: 13 additions & 1 deletion apps/aitino/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,36 @@
"svelte": "^4.2.7",
"svelte-check": "^3.6.0",
"svelte-split-testing": "^1.1.3",
"sveltekit-superforms": "^1.13.3",
"tailwindcss": "^3.3.6",
"tslib": "^2.4.1",
"typescript": "^5.0.0",
"vite": "^5.0.3"
"vite": "^5.0.3",
"zod": "^3.22.4"
},
"type": "module",
"dependencies": {
"@cartamd/plugin-code": "^3.0.1",
"@dagrejs/dagre": "^1.0.4",
"@supabase/auth-helpers-sveltekit": "^0.10.7",
"@supabase/supabase-js": "^2.39.3",
"@sveltejs/adapter-vercel": "^4.0.4",
"@sveltejs/site-kit": "^5.2.2",
"@types/wicg-file-system-access": "^2023.10.4",
"@xyflow/svelte": "^0.0.35",
"axios": "^1.6.7",
"bits-ui": "^0.16.0",
"carta-md": "^3.5.0",
"clsx": "^2.1.0",
"esm-env": "^1.0.0",
"esm-seedrandom": "^3.0.5",
"force": "^0.0.3",
"formsnap": "^0.4.2",
"lucide-svelte": "^0.321.0",
"mdsvex": "^0.11.0",
"mode-watcher": "^0.2.0",
"svelte-markdown": "^0.4.1",
"object-hash": "^3.0.0",
"svelte-sonner": "^0.3.11",
"tailwind-merge": "^2.2.0",
"tailwind-variants": "^0.1.20",
Expand Down
4 changes: 2 additions & 2 deletions apps/aitino/postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const tailwindcss = require('tailwindcss');
const autoprefixer = require('autoprefixer');
const tailwindcss = require("tailwindcss");
const autoprefixer = require("autoprefixer");

const config = {
plugins: [
Expand Down
6 changes: 5 additions & 1 deletion apps/aitino/src/app.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ declare global {
// interface Error {}
interface Locals {
userId: string;
supabase: SupabaseClient;
getSession(): Promise<Session | null>;
}
interface PageData {
session: Session | null;
}
// interface PageData {}
// interface PageState {}
// interface Platform {}
}
Expand Down
26 changes: 15 additions & 11 deletions apps/aitino/src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,33 @@
<html lang="en" class="dark">
<head>
<meta charset="utf-8" />
<title>
Aitino
</title>
<meta name="description" content="The world's leading web platform in pairing modern AI models with highly effective multi-agent technologies. By taking the form of node-editors, Aitino harnesses the ability to create teams of AI agents that collaborate to solve complex tasks in real-time." />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<title>Aitino</title>
<meta
name="description"
content="The world's leading web platform in pairing modern AI models with highly effective multi-agent technologies. By taking the form of node-editors, Aitino harnesses the ability to create teams of AI agents that collaborate to solve complex tasks in real-time."
/>
<link rel="icon" href="%sveltekit.assets%/favicon.png" sizes="any" />
<link rel="icon" href="%sveltekit.assets%/logo/logo.svg" type="image/svg+xml" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="google-site-verification" content="dnoWzKQeMa1SegspMoenOTOwuRb_kM2juP8-oRRT7zE" />
%sveltekit.head%

<!-- Google Tag Manager -->
<script>
(function (w, d, s, l, i) {
w[l] = w[l] || [];
w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' });
w[l].push({ "gtm.start": new Date().getTime(), event: "gtm.js" });
var f = d.getElementsByTagName(s)[0],
j = d.createElement(s),
dl = l != 'dataLayer' ? '&l=' + l : '';
dl = l != "dataLayer" ? "&l=" + l : "";
j.async = true;
j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
j.src = "https://www.googletagmanager.com/gtm.js?id=" + i + dl;
f.parentNode.insertBefore(j, f);
})(window, document, 'script', 'dataLayer', 'GTM-NL88SKDC');
})(window, document, "script", "dataLayer", "GTM-NL88SKDC");
</script>
<!-- End Google Tag Manager -->
</head>
<body data-sveltekit-preload-data="hover">
<body data-sveltekit-preload-data="hover" class="">
<!-- Google Tag Manager (noscript) -->
<noscript
><iframe
Expand All @@ -37,6 +40,7 @@
></iframe
></noscript>
<!-- End Google Tag Manager (noscript) -->
<div style="display: contents">%sveltekit.body%</div>

<div style="display: contents" class="h-full overflow-hidden">%sveltekit.body%</div>
</body>
</html>
17 changes: 15 additions & 2 deletions apps/aitino/src/app.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
--border: 45 45 45;
--input: 30 41 59;
--ring: 123 123 123;
--radius: 0.5rem;
}
}

Expand All @@ -53,9 +54,21 @@
@apply border-border;
}
body {
@apply text-accent-50 h-full overflow-hidden bg-background;
@apply h-full bg-background text-accent-50;
}
html body {
@apply h-full overflow-hidden;
@apply h-full;
}
}

@layer utilities {
/* Hide scrollbar for Chrome, Safari and Opera */
.no-scrollbar::-webkit-scrollbar {
display: none;
}
/* Hide scrollbar for IE, Edge and Firefox */
.no-scrollbar {
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}
}
32 changes: 32 additions & 0 deletions apps/aitino/src/hooks.server.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { authenticateUser } from "$lib/utils";
import { PUBLIC_SUPABASE_URL, PUBLIC_SUPABASE_ANON_KEY } from "$env/static/public";
import { createSupabaseServerClient } from "@supabase/auth-helpers-sveltekit";

import type { Handle } from "@sveltejs/kit";

export const handle: Handle = async ({ event, resolve }) => {
authenticateUser(event);

event.locals.supabase = createSupabaseServerClient({
supabaseUrl: PUBLIC_SUPABASE_URL,
supabaseKey: PUBLIC_SUPABASE_ANON_KEY,
event
});

/**
* a little helper that is written for convenience so that instead
* of calling `const { data: { session } } = await supabase.auth.getSession()`
* you just call this `await getSession()`
*/
event.locals.getSession = async () => {
const {
data: { session }
} = await event.locals.supabase.auth.getSession();
return session;
};
return await resolve(event, {
filterSerializedResponseHeaders(name) {
return name === "content-range";
}
});
};
13 changes: 6 additions & 7 deletions apps/aitino/src/lib/api-client.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { type Node, type Edge } from '@xyflow/svelte';
import { supabase } from "$lib/supabase";
import type { TablesInsert } from "$lib/supabase.types";

import { supabase } from '$lib/supabase';

export async function saveMaeveNodes(data: { user_id: string; nodes: Node[]; edges: Edge[] }) {
return supabase.from('maeve_nodes').upsert(data);
export async function saveMaeveNodes(data: TablesInsert<"maeve_nodes">) {
return supabase.from("maeve_nodes").upsert(data);
}

export async function getMeaveNodes(userId: string) {
return supabase.from('maeve_nodes').select('*').eq('user_id', userId).single();
export async function getMaeveNodes(userId: string) {
return await supabase.from("maeve_nodes").select("*").eq("user_id", userId);
}
83 changes: 83 additions & 0 deletions apps/aitino/src/lib/components/BlogContentsTable.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<script lang="ts">
import { page } from "$app/stores";
import {
Paperclip,
Receipt,
PencilRuler,
PlusCircle,
PieChart,
Building,
Table,
ScrollText
} from "lucide-svelte";
import type { SvelteComponent } from "svelte";
</script>

<!-- Static sidebar for desktop -->
<div class="hidden h-full overflow-y-clip lg:z-50 lg:flex lg:w-72 lg:flex-col">
<!-- Sidebar component, swap this element with another sidebar if you like -->
<div
class="m-4 flex grow flex-col gap-y-5 overflow-hidden rounded-2xl border bg-primary-900/20 px-6 pb-6 text-white"
>
<div class="flex h-16 shrink-0 items-center px-2 pt-6">
<a href="https://flowbite.com" class="mr-4 flex place-items-center space-x-2">
<Logo color="accent" />
<span class="self-center whitespace-nowrap text-2xl font-semibold dark:text-white">Oak</span
>
</a>
</div>
<nav class="flex flex-col pt-0 sm:mt-0 sm:pt-0">
<ul role="list" class="flex list-none flex-col gap-y-0 pl-0 sm:mt-0 sm:pl-0">
<li class="my-0 pl-0 sm:my-0 sm:pl-0">
{#each navigations as { name, items }}
<ul role="list" class=" mb-6 list-none gap-4 pl-0 sm:mb-8 sm:pl-0">
<p class="m-0 px-2 pb-2 text-xs font-semibold sm:m-0">{name}</p>
{#each items as { name, href, icon, current, pendingCount }}
<li class="m-0 pl-0 sm:m-0 sm:pl-0">
<!-- Current: "bg-gray-800 text-primary-foreground", Default: "text-gray-400 hover:text-primary-foreground hover:bg-gray-800" -->
<a
href={"/home/" + href}
class="group flex gap-x-3 rounded-md p-2 text-sm font-semibold transition transition-colors transition-transform hover:translate-x-2 hover:scale-[1.04] {$page.url.pathname.includes(
href
)
? 'bg-accent/90 text-accent-foreground hover:bg-accent '
: 'text-primary-foreground opacity-100 hover:text-accent'}"
>
<LucideIcon name={icon} />
{name}
{#if pendingCount}
<span
class="ml-auto rounded-full bg-accent px-2 py-1 text-xs font-semibold text-accent-foreground"
>
{pendingCount}
</span>
{/if}
</a>
</li>
{/each}
</ul>
{/each}
</li>
<li class="mt-auto pl-0 sm:mt-auto sm:pl-0">
<ul role="list" class=" m-0 list-none pl-0 sm:m-0 sm:pl-0">
{#each bottomNavigation as { name, href, icon, current }}
<li class="pb-0 pl-0 sm:pl-0">
<a
href={"/home/" + href}
class="group flex gap-x-3 rounded-md p-2 text-sm font-semibold transition transition-colors transition-transform hover:translate-x-2 hover:scale-[1.04] {$page.url.pathname.includes(
href
)
? 'bg-accent/90 text-accent-foreground hover:bg-accent '
: 'text-primary-foreground opacity-100 hover:text-accent'}"
>
<LucideIcon name={icon} />
{name}
</a>
</li>
{/each}
</ul>
</li>
</ul>
</nav>
</div>
</div>
Loading

0 comments on commit cbe612b

Please sign in to comment.