Skip to content

Commit 989427b

Browse files
committed
♻️ Cleanup build issues on console
1 parent aa8f977 commit 989427b

File tree

9 files changed

+51
-89
lines changed

9 files changed

+51
-89
lines changed

.idea/codeStyles/Project.xml

Lines changed: 11 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

console/.prettierrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"semi": true,
77
"singleQuote": false,
88
"jsxBracketSameLine": true,
9+
"plugins": ["prettier-plugin-organize-imports"],
910
"overrides": [ {
1011
"files": "*.svelte",
1112
"options": {

console/package-lock.json

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

console/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"monaco-editor": "^0.43.0",
4141
"postcss": "^8.4.29",
4242
"prettier": "^2.8.0",
43+
"prettier-plugin-organize-imports": "^3.2.3",
4344
"prettier-plugin-svelte": "^2.10.1",
4445
"react": "^18.2.0",
4546
"react-dom": "^18.2.0",

console/src/routes/+layout.server.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.

console/src/routes/+layout.svelte

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
<script lang="ts">
22
import type { LayoutData } from "./$types";
33
import "../app.css";
4-
import LoadingFrame from "$lib/components/common/loading-frame/LoadingFrame.svelte";
54
import { SvelteToast } from "@zerodevx/svelte-toast";
6-
export let data: LayoutData;
75
</script>
86

9-
{#await data.lazy.context}
10-
<LoadingFrame />
11-
{:then context}
12-
<SvelteToast />
13-
<slot />
14-
{/await}
7+
<SvelteToast />
8+
<slot />

console/src/routes/project/[projectId]/agent/[agentId]/+layout.svelte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import { page } from "$app/stores";
66
import MainTitleSkeleton from "$lib/components/common/skeleton/MainTitleSkeleton.svelte";
77
import { projectStore } from "$lib/stores/project";
8+
import { projectOverviewRoute } from "$lib/routes/routes";
89
910
export let data: PageData;
1011
@@ -23,7 +24,7 @@
2324
2425
const agentPromise = fetchAgentDetails($page.params.agentId).then((agent) => {
2526
if (!agent) {
26-
goto(agentOverviewRoute.path(project.id));
27+
goto(projectOverviewRoute.path(project.id));
2728
}
2829
2930
setCurrentAgent(agent);
@@ -60,7 +61,7 @@
6061
</div>
6162
{:then agent}
6263
<span class="text-body-accent dark:text-body-accent-dark font-semibold text-2xl"
63-
>{$agentStore.currentAgent.name}</span>
64+
>{$agentStore.currentAgent?.name}</span>
6465
<CopiableTag value={agent.id} />
6566
{/await}
6667
</div>

console/src/routes/project/[projectId]/agent/[agentId]/general/+page.svelte

Lines changed: 10 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
<script lang="ts">
2-
import { Icon, DocumentDuplicate, CursorArrowRays, BookOpen } from "svelte-hero-icons";
2+
import { Icon, CursorArrowRays, BookOpen } from "svelte-hero-icons";
33
import DiscordIcon from "$lib/assets/img/discord-icon.svg";
4-
import TopCover from "$lib/components/common/top-cover/TopCover.svelte";
54
import Typography from "$lib/components/common/typography/Typography.svelte";
65
import Card from "$lib/components/common/card/Card.svelte";
76
import Button from "$lib/components/common/button/Button.svelte";
8-
import Input from "$lib/components/common/input/Input.svelte";
9-
import type { PageData } from "./$types";
10-
import { z as zod } from "zod";
11-
import { superForm } from "sveltekit-superforms/client";
127
import Spacer from "$lib/components/common/spacer/Spacer.svelte";
13-
import { fetchAgentDetails } from "$lib/usecases/agents/fetchAgentDetails";
14-
import { page } from "$app/stores";
15-
import MainTitleSkeleton from "$lib/components/common/skeleton/MainTitleSkeleton.svelte";
16-
import Alert from "$lib/components/common/alert/Alert.svelte";
178
import Tabs from "$lib/components/common/tabs/Tabs.svelte";
189
import { projectStore } from "$lib/stores/project";
1910
import {
@@ -22,38 +13,21 @@
2213
} from "$lib/components/project/agents/code-snippets/onboarding.snippet";
2314
2415
import Monaco from "svelte-monaco";
25-
export let data: PageData;
26-
27-
const { form, errors, validate } = superForm(data.form, {
28-
validators: zod.object({
29-
name: zod.string().min(3).max(20)
30-
}),
31-
validationMethod: "oninput"
32-
});
33-
34-
const handleValidation = async (e: Event) => {
35-
e.preventDefault();
36-
const res = await validate();
37-
38-
if (!res.valid) {
39-
errors.set(res.errors);
40-
return;
41-
}
42-
};
43-
4416
import { PUBLIC_AI_AGENT_DOMAIN } from "$env/static/public";
45-
import TabNav from "$lib/components/common/navigation/tab-nav/TabNav.svelte";
46-
import { projectAuthMethodsRoute, projectMembersRoute } from "$lib/routes/routes";
4717
import SDKSecretGenerator from "$lib/components/project/secret/SDKSecretGenerator.svelte";
18+
import { agentStore } from "$lib/stores/agent";
4819
4920
const project = $projectStore.currentProject;
50-
51-
console.log("project", project);
21+
const agent = $agentStore.currentAgent;
5222
5323
if (!project) {
5424
throw new Error("Project not found");
5525
}
5626
27+
if (!agent) {
28+
throw new Error("Agent not found");
29+
}
30+
5731
const tabItems: {
5832
value: string;
5933
id: string;
@@ -71,29 +45,25 @@
7145
}
7246
];
7347
74-
let currentStep: "open-frontend" | "authentication" | "send-message" = "open-frontend";
75-
7648
let selectedTab = "python";
7749
7850
$: snippetValue =
7951
selectedTab === "python"
8052
? onboardingPythonCode({
8153
projectId: project.id,
8254
projectSlug: project.slug,
83-
agentId: "the-agent-id"
55+
agentId: agent.id
8456
})
8557
: onboardingTypescriptCode({
8658
projectId: project.id,
8759
projectSlug: project.slug,
88-
// TODO: replace with the real agent id
89-
agentId: "the-agent-id"
60+
agentId: agent.id
9061
});
9162
9263
$: projectSlug = project.slug;
9364
9465
const openFrontend = () => {
9566
window.open(`http://${projectSlug}.${PUBLIC_AI_AGENT_DOMAIN}/register`, "_blank");
96-
currentStep = "authentication";
9767
};
9868
</script>
9969

@@ -111,13 +81,7 @@
11181
<div
11282
class="rounded-md overflow-hidden"
11383
style="position: relative; padding-bottom: 62.5%; height: 0;">
114-
<iframe
115-
src="https://www.loom.com/embed/12882db32c6f44caae36dac02a7a8b9a?sid=fcd12081-8939-475a-91fb-fbcd805357a7"
116-
frameborder="0"
117-
webkitallowfullscreen
118-
mozallowfullscreen
119-
allowfullscreen
120-
style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" />
84+
<!-- TUTORIAL / IFRAME GOES HERE -->
12185
</div>
12286
</div>
12387
</section>

console/src/routes/project/[projectId]/agent/[agentId]/settings/+page.svelte

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
2727
const { form, errors, validate } = superForm(
2828
{
29+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
30+
// @ts-ignore
2931
name: agent.name
3032
},
3133
{

0 commit comments

Comments
 (0)