text
stringlengths
3
8.33k
repo
stringclasses
52 values
path
stringlengths
6
141
language
stringclasses
35 values
sha
stringlengths
64
64
chunk_index
int32
0
273
n_tokens
int32
1
896
{ "id": "011efa9e-42c7-4ff6-830a-02106f6638c9", "prevId": "b5d8e862-936f-4419-a50f-97be3e7fe665", "version": "7", "dialect": "postgresql", "tables": { "public.Chat": { "name": "Chat", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "...
daytona-generative-ui
www/lib/db/migrations/meta/0003_snapshot.json
JSON
c86aa21597ce928291505e64d6e4fbb3bb442a009ce8948714ba3605f5cc9e9c
0
896
"primaryKey": false, "notNull": true }, "content": { "name": "content", "type": "json", "primaryKey": false, "notNull": true }, "createdAt": { "name": "createdAt", "type": "timestamp", "primaryKey": false, ...
daytona-generative-ui
www/lib/db/migrations/meta/0003_snapshot.json
JSON
b728ce2530c5330455ede4097b29c75c1b2e939a16beb183a3c5b24058ed12a0
1
896
{ "id": "30ad8233-1432-428b-93fc-2bb1ba867ff1", "prevId": "011efa9e-42c7-4ff6-830a-02106f6638c9", "version": "7", "dialect": "postgresql", "tables": { "public.Chat": { "name": "Chat", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "...
daytona-generative-ui
www/lib/db/migrations/meta/0004_snapshot.json
JSON
45cca46bbb3443fa86ccd15f72a8771360288ecddeeba71445daef64477b4826
0
896
{ "id": "c6c102e6-b64e-4f0c-a7a6-32df758de437", "prevId": "30ad8233-1432-428b-93fc-2bb1ba867ff1", "version": "7", "dialect": "postgresql", "tables": { "public.Chat": { "name": "Chat", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "...
daytona-generative-ui
www/lib/db/migrations/meta/0005_snapshot.json
JSON
d9d1d81defe222687298cb0eee9618d1685d78e8e1d0d1b3d52467f43f84b484
0
896
, "type": "uuid", "primaryKey": false, "notNull": true }, "role": { "name": "role", "type": "varchar", "primaryKey": false, "notNull": true }, "parts": { "name": "parts", "type": "json", "...
daytona-generative-ui
www/lib/db/migrations/meta/0005_snapshot.json
JSON
21f219c6b9506967e8471b806cd309c9f3479146c02b627d624d02158eea6275
1
896
, "default": false }, "userId": { "name": "userId", "type": "uuid", "primaryKey": false, "notNull": true }, "createdAt": { "name": "createdAt", "type": "timestamp", "primaryKey": false, "notNull": t...
daytona-generative-ui
www/lib/db/migrations/meta/0005_snapshot.json
JSON
476f8cdf94f4c09da40756c14ea9782aaa23c2249d0b598b6ad41a7222603d25
2
896
: { "name": "messageId", "type": "uuid", "primaryKey": false, "notNull": true }, "isUpvoted": { "name": "isUpvoted", "type": "boolean", "primaryKey": false, "notNull": true } }, "indexes": {}, "fore...
daytona-generative-ui
www/lib/db/migrations/meta/0005_snapshot.json
JSON
2ab8591865ecf33add6a4eb6edc326182d85d5a12068bfd91c3a5ecd7c527475
3
306
type": "uuid", "primaryKey": false, "notNull": true }, "role": { "name": "role", "type": "varchar", "primaryKey": false, "notNull": true }, "parts": { "name": "parts", "type": "json", "primaryKey": ...
daytona-generative-ui
www/lib/db/migrations/meta/0006_snapshot.json
JSON
6edce500ad3f83116b0d86e72a738e37bf4d64ffe0d4507ef36bf25f44c7a085
1
896
schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": false, "notNull": true, "default": "gen_random_uuid()" }, "documentId": { "name": "documentId", "type": "uuid", "primaryKey": false,...
daytona-generative-ui
www/lib/db/migrations/meta/0006_snapshot.json
JSON
9a69a558674a8820c4427e36ce0506697c47c96821d970b9ba3b9f9ebbefc4c1
2
896
}, "indexes": {}, "foreignKeys": { "Vote_v2_chatId_Chat_id_fk": { "name": "Vote_v2_chatId_Chat_id_fk", "tableFrom": "Vote_v2", "tableTo": "Chat", "columnsFrom": ["chatId"], "columnsTo": ["id"], "onDelete": "no action", "onUpdate":...
daytona-generative-ui
www/lib/db/migrations/meta/0006_snapshot.json
JSON
fdcc46cea138ca9680a15d3b7a4ac0847b1f92e683c613f9c266ca58afe42c89
3
563
{ "id": "097660a7-976a-4b3e-8ebb-79312e3ece6f", "prevId": "443de550-b7e8-4bfb-b229-c12dc6c132f0", "version": "7", "dialect": "postgresql", "tables": { "public.Chat": { "name": "Chat", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "...
daytona-generative-ui
www/lib/db/migrations/meta/0007_snapshot.json
JSON
258c97b2037956f117088d2b3124eb798121f95614209504d5b8025e7c53279c
0
896
{ "id": "8d0a700d-0a74-4de8-9cea-359902f9a967", "prevId": "097660a7-976a-4b3e-8ebb-79312e3ece6f", "version": "7", "dialect": "postgresql", "tables": { "public.Chat": { "name": "Chat", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "...
daytona-generative-ui
www/lib/db/migrations/meta/0008_snapshot.json
JSON
d570561cb0e69a10d6ec37d886e4ac2856979a143cd4efedc2dd76388163419a
0
896
{ "version": "7", "dialect": "postgresql", "entries": [ { "idx": 0, "version": "7", "when": 1728598022383, "tag": "0000_keen_devos", "breakpoints": true }, { "idx": 1, "version": "7", "when": 1730207363999, "tag": "0001_sparkling_blue_marvel", ...
daytona-generative-ui
www/lib/db/migrations/meta/_journal.json
JSON
634ba0432584b7e77f65bc322a13a18693116779cd69c2cb2f4073206ce85ee6
0
356
import { textblockTypeInputRule } from "prosemirror-inputrules"; import { Schema } from "prosemirror-model"; import { schema } from "prosemirror-schema-basic"; import { addListNodes } from "prosemirror-schema-list"; import type { Transaction } from "prosemirror-state"; import type { EditorView } from "prosemirror-view"...
daytona-generative-ui
www/lib/editor/config.ts
TypeScript
e4376c03a7a793137fcf9f23508400bfaf42335cd3c72bbec146809f49650fdd
0
337
]; export const getNodeChildren = (node) => node.content?.content ?? []; export const getNodeText = (node) => node.text; export const isTextNode = (node) => node.type?.name === "text"; export const matchNodeType = (node1, node2) => node1.type?.name === node2.type?.name || (Array.isArray(node1) && Array.isArray(...
daytona-generative-ui
www/lib/editor/diff.js
JavaScript
a68b9d5d379a717b426ccad667a2a0495aed5db4aa34f440e5d888b4c9a6a5af
3
457
"use client"; import { defaultMarkdownSerializer } from "prosemirror-markdown"; import { DOMParser, type Node } from "prosemirror-model"; import { Decoration, DecorationSet, type EditorView } from "prosemirror-view"; import { renderToString } from "react-dom/server"; import { Response } from "@/components/elements/re...
daytona-generative-ui
www/lib/editor/functions.tsx
TypeScript
adc363f04fc05de408579816f094f06a7be8e4b31778b168b99645dbbdc8981a
0
337
import { createRoot } from "react-dom/client"; // biome-ignore lint/complexity/noStaticOnlyClass: "Needs to be static" export class ReactRenderer { static render(component: React.ReactElement, dom: HTMLElement) { const root = createRoot(dom); root.render(component); return { destroy: () => root.un...
daytona-generative-ui
www/lib/editor/react-renderer.tsx
TypeScript
ab2324ff41ba36b818272edfa227f470a3082dde6da23c40ae32bde5aeccdb70
0
81
import type { Node } from "prosemirror-model"; import { Plugin, PluginKey } from "prosemirror-state"; import { type Decoration, DecorationSet, type EditorView, } from "prosemirror-view"; import { createRoot } from "react-dom/client"; import type { ArtifactKind } from "@/components/artifact"; import { Suggestion a...
daytona-generative-ui
www/lib/editor/suggestions.tsx
TypeScript
0a9c010ab745dc5dbc16d047f0c8ccfc928aedf27668b5c7f6fe2f3e830be4a5
0
801
'use server'; import { runSandboxCommand, type SandboxResult } from './utils'; interface DevLogsSummary { hasErrors: boolean; hasWarnings: boolean; isCompiling: boolean; errorCount: number; warningCount: number; errors: Array<{ type: string; message: string; file?: string; line?: number }>; ...
daytona-generative-ui
www/lib/sandbox/dev-logs.ts
TypeScript
664f9fa34cf9fc7bd64393b2ee068d39030f3f1e97c6c321fb9d2248f979203a
0
896
}, }; } catch (error) { console.error('Failed to get dev server status:', error); return { success: false, error: { type: 'UNKNOWN_ERROR', message: 'Failed to get dev server status', details: error instanceof Error ? err...
daytona-generative-ui
www/lib/sandbox/dev-logs.ts
TypeScript
99a607809fc441db2f30fafb58360bb685e5aa2adf0ea6047a339bfbee259dd4
1
74
import * as HugeIcons from "hugeicons-react"; export interface ToolItemData { id: string; toolName: string; status: "pending" | "completed" | "error"; result?: any; input?: any; } export interface FormattedToolItem { id: string; icon: React.ComponentType<any>; label: string; suffix...
daytona-generative-ui
www/lib/sandbox/tool-formatters.ts
TypeScript
a9dd251e2ad1ed20e97a506fc46008ae234e082446044cf91bf7dc712c061d33
0
896
(36); const hasError = result?.error; switch (toolName) { case "sandbox_writeFile": { const path = result?.path || input?.path || "unknown"; const fileName = path.split("/").pop() || path; const extension = getExtensionFromPath(path); const { icon, color ...
daytona-generative-ui
www/lib/sandbox/tool-formatters.ts
TypeScript
fca0e120adbc29199ce5d5fe82e5e2dec8fc305d4fef889280141028f53b814c
1
896
.` : query; return { id, icon: HugeIcons.SearchList01Icon, label: result?.taskNameComplete || `Searched: ${shortQuery}`, color: "#4CAF50", status: hasError ? "error" : "completed", }; } case "reason...
daytona-generative-ui
www/lib/sandbox/tool-formatters.ts
TypeScript
e0ab76da1b79fe3439a2424cceb72f0496fbbffe018c2e8cd9c475120a5c8f70
2
896
}; } case "sandbox_shell": { const command = input?.command || "command"; const shortCommand = command.length > 30 ? `${command.substring(0, 30)}...` : command; return { id, icon: HugeIcons.File02Icon, label: `Running:...
daytona-generative-ui
www/lib/sandbox/tool-formatters.ts
TypeScript
32a776d902f84dd5315aa77b96b3fd49fbb1008ab9e9b041a726bdcf4bab8c20
3
896
() || path; return `Writing ${fileName}...`; } case "sandbox_editFile": { const path = input?.file_path || "file"; const fileName = path.split("/").pop() || path; return `Editing ${fileName}...`; } case "sandbox_readFile": { c...
daytona-generative-ui
www/lib/sandbox/tool-formatters.ts
TypeScript
0a9652272476f0ccc560f9ea21ea1437596e2837195908c138ca6c6724cae753
4
427
import { SandboxInfo } from "@daytonaio/sdk/src/Sandbox"; export interface SandboxData { id: string; title: string; template?: string; previewUrl?: string; info?: SandboxInfo; files?: Record<string, string>; } export interface FileFilteringOptions { respectGitIgnore: boolean; }
daytona-generative-ui
www/lib/sandbox/types.d.ts
TypeScript
9e675e059f1a58ad28366bebe8d1db6ea2e31147fb4cc60c57faa78f9155beda
0
63
'use server'; import type { SandboxData } from '@/lib/sandbox/types'; import { Daytona } from '@daytonaio/sdk'; import { ignoredFiles, ignoredPatterns } from '@/lib/utils'; if (!process.env.DAYTONA_API_KEY || !process.env.DAYTONA_API_URL) { throw new Error('DAYTONA_API_KEY and DAYTONA_API_URL must be set'); } // D...
daytona-generative-ui
www/lib/sandbox/utils.ts
TypeScript
a6bb0b5e2e2f403353f7c31fea12282eb7e508b9c772f526daa51f45df686dc7
0
896
(); return createSuccessResult(true); } catch (error) { console.error(`Failed to delete sandbox ${sandboxId}:`, error); return createErrorResult( 'UNKNOWN_ERROR', `Failed to delete sandbox ${sandboxId}`, error instanceof Error ? error.message : String(error), error, sandboxId...
daytona-generative-ui
www/lib/sandbox/utils.ts
TypeScript
e2f53a41eaa86b6f05582cac19e7ca2acd3214668492807c6182f6a36bce499c
1
896
const lines = output.trim().split('\n'); for (const line of lines) { if (!line || line.trim() === '') continue; const parts = line.trim().split(/\s+/); if (parts.length < 9) { console.warn('Skipping malformed ls output:', line); continue; } const permissions = parts[...
daytona-generative-ui
www/lib/sandbox/utils.ts
TypeScript
57297771aa6f5a816145c294863de4de162d17b1fdc4d8d2176851e78b2dd50a
2
896
error, sandboxId, undefined, filePath ); } }; export const readSandboxFile = async ( sandboxId: string, filePath: string, ): Promise<SandboxResult<string>> => { try { const fileResult = await downloadSandboxFile(sandboxId, filePath); if (!fileResult.success) { // Convert the...
daytona-generative-ui
www/lib/sandbox/utils.ts
TypeScript
83e2e8cbbfec5ceb98c6b1b7cc25e1561a65cdf9b7ec771bd2c2daa57be05983
3
896
null, sandboxId, undefined, folderPath ); } await sandbox.fs.createFolder(folderPath, permissions); return createSuccessResult(true); } catch (error) { console.error( `Failed to create folder ${folderPath} in sandbox ${sandboxId}:`, error, ); return c...
daytona-generative-ui
www/lib/sandbox/utils.ts
TypeScript
1324b14263c0857095c92b9f5953a87adf340398c1ca0fc931dbba6955d80372
4
896
, null, sandboxId ); } await sandbox.process.createSession(sessionId); return createSuccessResult(undefined); } catch (error) { console.error(`Failed to create session ${sessionId}:`, error); return createErrorResult( 'COMMAND_FAILED', `Failed to create process s...
daytona-generative-ui
www/lib/sandbox/utils.ts
TypeScript
37296cea8e539d0cafacfc45f0f99ec5068f1aaab6325f897c6e6b17576bc0b8
5
896
); return createSuccessResult(output); } catch (error) { console.error(`Failed to run command in sandbox ${sandboxId}:`, error); return createErrorResult( 'COMMAND_FAILED', `Failed to run command in sandbox ${sandboxId}`, error instanceof Error ? error.message : String(error), err...
daytona-generative-ui
www/lib/sandbox/utils.ts
TypeScript
0caf8f44f6ee7641f67ac6bfc021a9eced06954e22269296c2c9f2bd0d8fd000
6
896
nyc_output/*' ! -path '*/.cache/*' ! -path '*/.parcel-cache/*' ! -path '*/.turbo/*' ! -path '*/.vercel/*' ! -path '*/logs/*' ! -path '*/.npm/*' ! -path '*/.pnpm-store/*' ! -path '*/.yarn/*' ! -path '*/tmp/*' ! -path '*/temp/*' ! -path '*/vendor/*' ! -path '*/.vendor/*' ! -path '*/__pycache__/*' ! -path '*/.pytest_cache...
daytona-generative-ui
www/lib/sandbox/utils.ts
TypeScript
3ff7ea9778c8f935477517e544e8727d1a21a66b3f1701062d2fefde12995784
7
448
import { expect as baseExpect, test as baseTest } from "@playwright/test"; import { getUnixTime } from "date-fns"; import { createAuthenticatedContext, type UserContext } from "./helpers"; type Fixtures = { adaContext: UserContext; babbageContext: UserContext; curieContext: UserContext; }; export const test = b...
daytona-generative-ui
www/tests/fixtures.ts
TypeScript
9c4c25fd37bfcbb86d00008a771ae4193911a839ff72ff376758920f9c32de7e
0
321
import fs from "node:fs"; import path from "node:path"; import { type APIRequestContext, type Browser, type BrowserContext, expect, type Page, } from "@playwright/test"; import { generateId } from "ai"; import { getUnixTime } from "date-fns"; import { ChatPage } from "./pages/chat"; export type UserContext =...
daytona-generative-ui
www/tests/helpers.ts
TypeScript
04c067b60b8acb99436c9c4020caf4a8e7c307b040b748871811818196ae6305
0
526
import { expect, test } from "../fixtures"; import { ArtifactPage } from "../pages/artifact"; import { ChatPage } from "../pages/chat"; test.describe("Artifacts activity", () => { let chatPage: ChatPage; let artifactPage: ArtifactPage; test.beforeEach(async ({ page }) => { chatPage = new ChatPage(page); ...
daytona-generative-ui
www/tests/e2e/artifacts.test.ts
TypeScript
d9679af0d01c919e4145dec486b2a109ca6151500eda1f486e34b78ea819b37f
0
482
import { expect, test } from "../fixtures"; import { ChatPage } from "../pages/chat"; test.describe("Chat activity", () => { let chatPage: ChatPage; test.beforeEach(async ({ page }) => { chatPage = new ChatPage(page); await chatPage.createNewChat(); }); test("Send a user message and receive response"...
daytona-generative-ui
www/tests/e2e/chat.test.ts
TypeScript
36e486f4de9dd465f3dee75a31ce709cf233048f7544b31d89f99949b96bc960
0
896
in sf?"); await chatPage.isGenerationComplete(); const assistantMessage = await chatPage.getRecentAssistantMessage(); expect(assistantMessage.content).toBe( "The current temperature in San Francisco is 17°C." ); }); test("Upvote message", async () => { await chatPage.sendUserMessage("Wh...
daytona-generative-ui
www/tests/e2e/chat.test.ts
TypeScript
d1cd8ac26f88e174833c46d7690957003823ff1c775cd5c95c35664a3d65cab2
1
536
import { expect, test } from "../fixtures"; import { ChatPage } from "../pages/chat"; test.describe("chat activity with reasoning", () => { let chatPage: ChatPage; test.beforeEach(async ({ curieContext }) => { chatPage = new ChatPage(curieContext.page); await chatPage.createNewChat(); }); test("Curie...
daytona-generative-ui
www/tests/e2e/reasoning.test.ts
TypeScript
27652fc63d1737bc8987603ecab3465533046cee637783ba874081a2aab8f5bc
0
453
import { getMessageByErrorCode } from "@/lib/errors"; import { expect, test } from "../fixtures"; import { generateRandomTestUser } from "../helpers"; import { AuthPage } from "../pages/auth"; import { ChatPage } from "../pages/chat"; test.describe .serial("Guest Session", () => { test("Authenticate as guest use...
daytona-generative-ui
www/tests/e2e/session.test.ts
TypeScript
926439a77dae32dd2f3745f7e3884a5a474fe39179a69881f0c233a15a9eb4bc
0
896
.expectToastToContain("Account created successfully!"); }); test("Register new account with existing email", async () => { await authPage.register(testUser.email, testUser.password); await authPage.expectToastToContain("Account already exists!"); }); test("Log into account that exists", as...
daytona-generative-ui
www/tests/e2e/session.test.ts
TypeScript
35e15131a81dafe68b5a187c99865200db1c30d38fe60973517e319b8e9082ca
1
852
import { expect, type Page } from "@playwright/test"; export class ArtifactPage { private readonly page: Page; constructor(page: Page) { this.page = page; } get artifact() { return this.page.getByTestId("artifact"); } get sendButton() { return this.artifact.getByTestId("send-button"); } ...
daytona-generative-ui
www/tests/pages/artifact.ts
TypeScript
141c39aeac466028a83b7bab33698459c15a75a78822cfd854cf90c959ac8065
0
643
import type { Page } from "@playwright/test"; import { expect } from "../fixtures"; export class AuthPage { private readonly page: Page; constructor(page: Page) { this.page = page; } async gotoLogin() { await this.page.goto("/login"); await expect(this.page.getByRole("heading")).toContainText("Si...
daytona-generative-ui
www/tests/pages/auth.ts
TypeScript
b57a8b2e64fbe2a8a150fdd75c3097e22005bb5790fa573a5bae7a56e57aaef4
0
607
import fs from "node:fs"; import path from "node:path"; import { expect, type Page } from "@playwright/test"; import { chatModels } from "@/lib/ai/models"; const CHAT_ID_REGEX = /^http:\/\/localhost:3000\/chat\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/; export class ChatPage { private readonl...
daytona-generative-ui
www/tests/pages/chat.ts
TypeScript
be251dbb7665a7e552c28f0f2ecfcb95abbc0b5a28c56325eedbdba138cd62e8
0
896
"private") { await this.page.getByTestId("visibility-selector").click(); await this.page .getByTestId(`visibility-selector-item-${chatVisibility}`) .click(); expect(await this.getSelectedVisibility()).toBe(chatVisibility); } async getRecentAssistantMessage() { const messageElements = aw...
daytona-generative-ui
www/tests/pages/chat.ts
TypeScript
07dac5d150fb3aaccbc208264159ac9763a05a26813471ef1b1a33db907d8a31
1
799
import type { ModelMessage } from "ai"; export const TEST_PROMPTS: Record<string, ModelMessage> = { USER_SKY: { role: "user", content: [{ type: "text", text: "Why is the sky blue?" }], }, USER_GRASS: { role: "user", content: [{ type: "text", text: "Why is grass green?" }], }, USER_THANKS: { ...
daytona-generative-ui
www/tests/prompts/basic.ts
TypeScript
c6e148e60231aaa1008355b4a6604d3b5773d3cff68cff4467207aac06ed7752
0
834
import { generateUUID } from "@/lib/utils"; export const TEST_PROMPTS = { SKY: { MESSAGE: { id: generateUUID(), createdAt: new Date().toISOString(), role: "user", content: "Why is the sky blue?", parts: [{ type: "text", text: "Why is the sky blue?" }], }, OUTPUT_STREAM: [ ...
daytona-generative-ui
www/tests/prompts/routes.ts
TypeScript
4d519ae3b6e83f942eee248e5f258af9d5256884b7d03b5908f98379ef67cdd3
0
630
import type { LanguageModelV2StreamPart } from "@ai-sdk/provider"; import { generateId, type ModelMessage } from "ai"; import { TEST_PROMPTS } from "./basic"; export function compareMessages( firstMessage: ModelMessage, secondMessage: ModelMessage ): boolean { if (firstMessage.role !== secondMessage.role) { ...
daytona-generative-ui
www/tests/prompts/utils.ts
TypeScript
0f6122c48987f9a5f04747e42df3f42df05a699c48fd546aeb8ed53ce0c8f9a8
0
896
(compareMessages(recentMessage, TEST_PROMPTS.USER_GRASS)) { return [ ...textToDeltas("It's just green duh!"), { type: "finish", finishReason: "stop", usage: { inputTokens: 3, outputTokens: 10, totalTokens: 13 }, }, ]; } if (compareMessages(recentMessage, TEST_PROMP...
daytona-generative-ui
www/tests/prompts/utils.ts
TypeScript
0a105d8d0abcd027420e9cdea76c98118a3fd71722ad0167589b1e8a2dd2564f
1
896
call", toolCallId: "call_456", toolName: "getWeather", input: JSON.stringify({ latitude: 37.7749, longitude: -122.4194 }), }, { type: "finish", finishReason: "stop", usage: { inputTokens: 3, outputTokens: 10, totalTokens: 13 }, }, ]; } if (compa...
daytona-generative-ui
www/tests/prompts/utils.ts
TypeScript
fb2777111ca1b4d3b8975745de7f96c482c935c7f23d9f461f152cd841f593d6
2
167
import { getMessageByErrorCode } from "@/lib/errors"; import { generateUUID } from "@/lib/utils"; import { expect, test } from "../fixtures"; import { TEST_PROMPTS } from "../prompts/routes"; const chatIdsCreatedByAda: string[] = []; // Helper function to normalize stream data for comparison function normalizeStreamD...
daytona-generative-ui
www/tests/routes/chat.test.ts
TypeScript
9f523d65518f450be81566ff4dd005027b8284cc200cbd5ccb524b6e11de43b1
0
896
; expect(response.status()).toBe(200); const deletedChat = await response.json(); expect(deletedChat).toMatchObject({ id: chatId }); }); test("Ada cannot resume stream of chat that does not exist", async ({ adaContext, }) => { const response = await adaContext.request.get( ...
daytona-generative-ui
www/tests/routes/chat.test.ts
TypeScript
d153be7f80d354947c8ba6a71ec9f1064d1a110018eb0dddbb993334d4452c39
1
896
.status(); expect(firstStatusCode).toBe(200); await firstResponse.text(); await new Promise((resolve) => setTimeout(resolve, 15 * 1000)); await new Promise((resolve) => setTimeout(resolve, 15_000)); const secondResponse = await adaContext.request.get( `/api/chat/${chatId}/stream` ...
daytona-generative-ui
www/tests/routes/chat.test.ts
TypeScript
8c6cacf5200135c0e5ff9a8cd102d27024fd6f78cb3fc83d1829a424fd757b29
2
692
import type { Document } from "@/lib/db/schema"; import { getMessageByErrorCode } from "@/lib/errors"; import { generateUUID } from "@/lib/utils"; import { expect, test } from "../fixtures"; const documentsCreatedByAda: Document[] = []; test.describe .serial("/api/document", () => { test("Ada cannot retrieve a ...
daytona-generative-ui
www/tests/routes/document.test.ts
TypeScript
924a4ea024b98d1b63d7a3ebdd952b38a846695c09f0f799ccc2a84fa6140061
0
896
adaContext.request.delete("/api/document"); expect(response.status()).toBe(400); const { code, message } = await response.json(); expect(code).toEqual("bad_request:api"); expect(message).toEqual(getMessageByErrorCode(code)); }); test("Ada cannot delete a document without specifying a t...
daytona-generative-ui
www/tests/routes/document.test.ts
TypeScript
2043d92037843cc1b0f8eda60bd3bd167c1a92e7e382589c83cc50cf968e35d6
1
667
# Dependencies and package managers node_modules .pnp .pnp.js # Build output and caches coverage .next/ out/ build .turbo next-env.d.ts tsconfig.tsbuildinfo # Local environment files .env copy.example .env .env.local .env.development.local .env.test.local .env.production.local .env*.local # Logs and local reports np...
diplomarbeit-ideen
.gitignore
Git Ignore
7fc927aa77ed5ff5033b16847e5b7a28c3d6c449429a94629004aba321d0341e
0
176
<!-- GSD:project-start source:PROJECT.md --> ## Project **Thesis Idea Engine** Thesis Idea Engine is a cloud-hosted chatbot that helps software-engineering school students find strong diploma-thesis topics grounded in the school's archive of past theses. It supports two ideation modes: starting from a vague spark or...
diplomarbeit-ideen
AGENTS.md
Markdown
331d041d0b0f6b068f2cecbcfeb984f088915260b706b5e611ca7f3915cf7a36
0
896
| `zod` | Template-pinned | Tool input validation | AI SDK tools should expose strict schemas. | | PDF/text extraction libraries | Decide after corpus inventory | Parse theses, slides, PDFs, and metadata | Pick only after Phase 0 identifies file types and OCR needs. | | BM25/sparse encoder tooling | Decide after corpus...
diplomarbeit-ideen
AGENTS.md
Markdown
f32209e70ca47d8d34b062eaa795e3d214120eb48d2c9e854aa532e5b367629d
1
896
SDK tools | Next.js route handlers | Use server-side tools with strict input schemas and streamed UI message responses. | | Qdrant dense vectors | Chosen embedding model dimensions | Vector dimensions are model-dependent; changing embedding model means re-indexing. | | Qdrant sparse vectors | Sparse encoder/tokenizer |...
diplomarbeit-ideen
AGENTS.md
Markdown
f607deee6a9c198ae3963f0549434efc0f7c6369e3e65dd451ab17bbb967ffd8
2
711
{ "$schema": "./node_modules/@biomejs/biome/configuration_schema.json", "extends": [ "ultracite/biome/core", "ultracite/biome/next", "ultracite/biome/react" ], "formatter": { "indentStyle": "space", "indentWidth": 2 }, "files": { "includes": [ "**/*", "!.planning", ...
diplomarbeit-ideen
biome.jsonc
JSON
21194b256de8d551e02419f35e8135dbd5c74f4ff804de3a4157444c0f23f11c
0
313
{ "$schema": "https://ui.shadcn.com/schema.json", "style": "radix-maia", "rsc": true, "tsx": true, "tailwind": { "config": "", "css": "app/globals.css", "baseColor": "neutral", "cssVariables": true, "prefix": "" }, "aliases": { "components": "@/components", "utils": "@/lib/util...
diplomarbeit-ideen
components.json
JSON
016c98fa8d0b667b43c0aa4770af08819f5537243aacc243389abe96d103de4f
0
150
import { config } from "dotenv"; import { defineConfig } from "drizzle-kit"; config({ path: ".env.local", }); export default defineConfig({ schema: "./lib/db/schema.ts", out: "./lib/db/migrations", dialect: "postgresql", dbCredentials: { url: process.env.POSTGRES_URL ?? "", }, });
diplomarbeit-ideen
drizzle.config.ts
TypeScript
93f925cff3be7f4348a56eb3d2d3d58ffb277beb6072473542171f1bd42568ff
0
92
import { initBotId } from "botid/client/core"; initBotId({ protect: [ { path: "/api/chat", method: "POST", }, ], });
diplomarbeit-ideen
instrumentation-client.ts
TypeScript
11506e424cc9874df178f3ef555a7ce46a32fa45506b00539f310a559a2bf1b4
0
42
import { registerOTel } from "@vercel/otel"; export function register() { registerOTel({ serviceName: "chatbot" }); }
diplomarbeit-ideen
instrumentation.ts
TypeScript
a01e4dc174df32e248a83ac700306e3e44c1751a47506c5de7e79c809f83a737
0
30
import { withBotId } from "botid/next/config"; import type { NextConfig } from "next"; const basePath = process.env.IS_DEMO === "1" ? "/demo" : ""; const nextConfig: NextConfig = { ...(basePath ? { basePath, assetPrefix: "/demo-assets", redirects: async () => [ { so...
diplomarbeit-ideen
next.config.ts
TypeScript
acf86e81b0db2a9e346380db9e0202cddf21cad5d2d7330df63be60949758edd
0
232
{ "name": "thesis-idea-engine", "version": "3.1.0", "private": true, "scripts": { "dev": "next dev --turbo", "build": "tsx lib/db/migrate && next build --webpack", "start": "next start", "check": "ultracite check", "fix": "ultracite fix", "db:generate": "drizzle-kit generate", "db:mi...
diplomarbeit-ideen
package.json
JSON
f7b944daffaca427f4db2f3550150524d4131a03a5557b2ed00d44078498d253
0
896
fast-deep-equal": "^3.1.3", "framer-motion": "^11.3.19", "katex": "^0.16.28", "lucide-react": "^0.446.0", "motion": "^12.23.26", "nanoid": "^5.1.3", "next": "16.2.0", "next-auth": "5.0.0-beta.25", "next-themes": "^0.3.0", "orderedmap": "^2.1.1", "papaparse": "^5.5.2", "postgr...
diplomarbeit-ideen
package.json
JSON
114a95d80117d7ad67bef9e08378e0ba232818380cbdfa310c1375d654516671
1
723
# PRD — Thesis Idea Engine > The seed brief for GSD's `/gsd-new-project`. Deliberately light on implementation detail: GSD's agents should **explore the data, propose a design, and ASK the user** before locking decisions. Anywhere this doc says *open*, GSD must raise a question rather than assume. --- ## 1. Summary ...
diplomarbeit-ideen
PRD.md
Markdown
f398c8bfcdf8a4e930c3cf7a3cb7e199eda11d32c98427b84b8d580d9456aa12
0
896
Hybrid + sparse stays regardless. - Exposed to the chat as AI SDK **tools** (search prior work / get-by-id / find-extensions). System prompt: always ground + cite, and surface gaps to keep ideas novel. ## 5. Custom artifact: `thesis-proposal` New `artifacts/thesis-proposal/` (`client.tsx` + `server.ts` via `createDoc...
diplomarbeit-ideen
PRD.md
Markdown
96114ce57d8bec63c76ada88851955523c92cad8cdbc9aa909460d8763c275f5
1
729
import { type NextRequest, NextResponse } from "next/server"; import { getToken } from "next-auth/jwt"; import { guestRegex, isDevelopmentEnvironment } from "./lib/constants"; export async function proxy(request: NextRequest) { const { pathname } = request.nextUrl; if (pathname.startsWith("/ping")) { return n...
diplomarbeit-ideen
proxy.ts
TypeScript
c6699c61d3265578452f702547ec5fc50552fc37dfe9fbc8c01523f6c112181d
0
359
# Diplomarbeit Ideen AI/ML thesis idea engine for HTL Donaustadt. The app helps students find realistic Diplomarbeit topics by retrieving prior projects from the archive, grounding every idea in cited evidence, and routing generation through Gemini or Vercel AI Gateway depending on available quota. ## Core Pipeline ...
diplomarbeit-ideen
README.md
Markdown
1a770d6912e500dca8ba2a8de806995f6fb6f8a30cfb849a67753226a4312d20
0
630
{ "framework": "nextjs" }
diplomarbeit-ideen
vercel.json
JSON
09ccb233849ac5b1ab2ea69fe8021fcfa6135742e6e9bd608f3727d32efbc40b
0
9
name: Lint on: push: jobs: build: runs-on: ubuntu-22.04 strategy: matrix: node-version: [20] steps: - uses: actions/checkout@v4 - name: Install pnpm uses: pnpm/action-setup@v4 with: version: 10.32.1 - name: Use Node.js ${{ matrix.node-version }}...
diplomarbeit-ideen
.github/workflows/lint.yml
YAML
914e24e04d7b6301f380f0dc4d74a125852ab74a906bb019b38f2e6bd39da716
0
125
{ "mode": "yolo", "granularity": "coarse", "parallelization": true, "commit_docs": true, "model_profile": "balanced", "workflow": { "research": true, "plan_check": true, "verifier": true, "nyquist_validation": false }, "plan_review": { "source_grounding": true }, "ship": { "p...
diplomarbeit-ideen
.planning/config.json
JSON
29cfd420a90762a984c4af46c5e72087d719c7687871bdece56e39e034eb2961
0
307
# Thesis Idea Engine ## What This Is Thesis Idea Engine is a cloud-hosted chatbot that helps software-engineering school students find strong diploma-thesis topics grounded in the school's archive of past theses. It supports two ideation modes: starting from a vague spark or blank slate, and building on top of a sele...
diplomarbeit-ideen
.planning/PROJECT.md
Markdown
c58ddaeb204df0b4ca11e8b4d0a131d90ce81d196bad57461950142c19d4bdda
0
896
scope, and idea-quality bar. - **Testing scope**: Keep tests lean and high-signal: ingestion/retrieval unit tests and E2E coverage for both ideation flows plus the custom artifact. ## Key Decisions | Decision | Rationale | Outcome | |----------|-----------|---------| | Start with corpus exploration as Phase 1 | The a...
diplomarbeit-ideen
.planning/PROJECT.md
Markdown
31012174df49cff34c98a90f66471b37b755746005e5b68bca8c9f575577d5bf
1
392
# Requirements: Thesis Idea Engine **Defined:** 2026-06-30 **Core Value:** Students can get creative but feasible thesis proposals that are grounded in, cite, and build on real prior theses from the archive. ## v1 Requirements ### Corpus Discovery - [x] **CORP-01**: User can run a discovery workflow that locates an...
diplomarbeit-ideen
.planning/REQUIREMENTS.md
Markdown
7141500366334d8fa4e48c462c8e31cdf6db023a1c67ef4bb859e2d8b0475b2c
0
896
Developer can deploy a fully self-hosted or offline variant if cloud hosting becomes unacceptable. ### Corpus Operations - **CORP-06**: Administrator can browse and manage indexed thesis records through a dedicated admin UI. - **CORP-07**: Administrator can schedule or trigger incremental archive updates after v1 ind...
diplomarbeit-ideen
.planning/REQUIREMENTS.md
Markdown
87d4bdb1a0ed2b82e701536547420e4e1eed477aaf2a265193a672e44c6ea45e
1
572
# Roadmap: Thesis Idea Engine ## Overview Build the product in four vertical MVP phases. Start by discovering the real corpus and confirming irreversible ingestion choices, then establish the Vercel Chatbot foundation, implement the hybrid prior-work engine, and finally expose grounded thesis ideation through chat to...
diplomarbeit-ideen
.planning/ROADMAP.md
Markdown
48741a1c9a41a2806e22b5e2def323e13451edfd3de8a849515eae53c1f979cb
0
896
Qdrant points. 2. Qdrant stores chunk-level dense vectors, sparse vectors, and confirmed payload metadata. 3. Retrieval can combine dense and sparse results with RRF and apply confirmed filters. 4. Retrieval results include structured citation provenance suitable for chat and artifacts. 5. Unit tests cover chun...
diplomarbeit-ideen
.planning/ROADMAP.md
Markdown
3d7ff1e03046b6f1f7b5138c0b00aa869daef69758c51ee87d0be51df7b3dab5
1
610
--- gsd_state_version: 1.0 milestone: v1.0 milestone_name: milestone current_phase: 4 current_phase_name: Grounded Ideation Flows and Proposal Artifact status: complete stopped_at: Milestone source-complete; cloud runtime UAT pending credentials last_updated: "2026-07-01T01:47:00.000+02:00" last_activity: 2026-07-01 la...
diplomarbeit-ideen
.planning/STATE.md
Markdown
ef2621aff2da003ce24b2f328e1b9e5ea00e5ecd68a188364ab193937bfd0826
0
896
Phase 4: Idea-quality scoring checks proposal sections, citation signals, source paths, novelty/gap framing, and feasibility signals. - Quick 20260701: Production chat/title generation uses direct `@ai-sdk/google` Gemini Interactions with `gemini-3.5-flash`; optional AI Gateway remains supported and defaults to `anthro...
diplomarbeit-ideen
.planning/STATE.md
Markdown
6b0aaa03701ca7ae84b409154bd22a61e31831eec4d5ff52740f6c1244884d99
1
486
{ "generated_at": "2026-06-30T21:08:44+00:00", "status": "approved", "phase": 1, "blocked_downstream": false, "approval_required_for": [ "embedding model and vector dimensions", "OCR/multimodal strategy", "metadata schema fields", "chunking rules", "sparse tokenization strategy", "Qdra...
diplomarbeit-ideen
.planning/corpus/APPROVAL-MANIFEST.json
JSON
dcda6148e679eb490f02040072dd1b33045b525ccebfd3df32a47ffc439d56ed
0
670
--- status: resolved phase: 1 created: "2026-06-30T20:55:54.613Z" resolved: "2026-06-30T21:03:28Z" --- # Corpus Archive Discovery Blocker This blocker has been resolved. `_SYPCopilot-Share (1).zip` was added to the repository root and successfully processed by `scripts/corpus_discovery.py`. ## Original Search Scope ...
diplomarbeit-ideen
.planning/corpus/ARCHIVE-BLOCKER.md
Markdown
b8b6fdd28e138117fe0395a341e4b794528822cb65173620a0bc360f64d3745b
0
183
{ "archive": "C:\\Development\\Private\\diplomarbeit-ideen\\_SYPCopilot-Share (1).zip", "archive_type": "zip", "size_bytes": 5152451123, "entry_count": 86, "file_count": 86, "directory_count": 0, "total_uncompressed_bytes": 5152431293, "total_compressed_bytes": 5152431293, "compression_ratio": 1.0, ...
diplomarbeit-ideen
.planning/corpus/archive-inspection.json
JSON
90b33d110117511b4d2490e7dfe5054d52394e09170276ac7f2bf3b6c43793cd
0
896
-ji.pdf", "_SYPCopilot-Share/syp-projekte/gebaerdentrainer/gebaerdentrainer-diplomarbeit.pdf", "_SYPCopilot-Share/syp-projekte/gebaerdentrainer/gebaerdentrainer-ideenpraesentation.pdf", "_SYPCopilot-Share/syp-projekte/gebaerdentrainer/gebaerdentrainer-jahrbuch.pdf", "_SYPCopilot-Share/syp-projekte/gebae...
diplomarbeit-ideen
.planning/corpus/archive-inspection.json
JSON
71c77a456f8752e5b49f192ecb79a9edb0c071d2331e7229347423ecba980de5
1
263
{ "generated_at": "2026-06-30T21:08:44+00:00", "pdf_samples": [ { "relative_path": "_SYPCopilot-Share/syp-projekte/airchif/airchif-aba-antrag.pdf", "project_slug": "airchif", "parser": "pymupdf", "page_count": 2, "sampled_pages": 2, "sample_text_chars": 5358, "chars_per...
diplomarbeit-ideen
.planning/corpus/content-samples.json
JSON
07c1e01b443abc9c2066aad910475258053fcd09c38cfbb058bca7c3e4598073
0
896
parser": "pymupdf", "page_count": 21, "sampled_pages": 5, "sample_text_chars": 6348, "chars_per_sampled_page": 1269, "image_count_sample": 1, "images_per_sampled_page": 0.2, "text_yield": "high", "ocr_candidate": false, "language_guess": { "language": "de", ...
diplomarbeit-ideen
.planning/corpus/content-samples.json
JSON
a09cf6a94494ba65946ae085080d38d5defe129ef429d836673733625224b531
1
896
null }, { "relative_path": "_SYPCopilot-Share/syp-projekte/blindin/blindin-diplomarbeit.pdf", "project_slug": "blindin", "parser": "pymupdf", "page_count": 105, "sampled_pages": 5, "sample_text_chars": 2975, "chars_per_sampled_page": 595, "image_count_sample": 3, ...
diplomarbeit-ideen
.planning/corpus/content-samples.json
JSON
b6c6df9205fa3f275e8006bb7e4235e7ff373c097a9c4e5c331e19dc29e28392
2
896
Goldack D I P L O M A R B E I T BlindIn Der sprechende Sportassistenz für sehbeeinträchtigte Senioren K U R Z B E S C H R E I B U N G Regelmäßige Bewegung fördert Gesundheit und Selbstständigkeit im Alter — doch für sehbeeinträchtigte Menschen ist das sichere und korrekte Durchführen von Sportübungen alleine oft eine g...
diplomarbeit-ideen
.planning/corpus/content-samples.json
JSON
0bd5d549acf0bf74305b7fc0b4135110c5851037d810a2b1ad64513f3703ea5c
3
896
want to understand how their sleep and their eating habits affect their mood would need our application. Expected Result: We aim to create an intuitive app that allows users to effortlessly document everyday moments and experiences. Our app is intended to offer everyone a free opportunity to get an overview of their", ...
diplomarbeit-ideen
.planning/corpus/content-samples.json
JSON
8a7f1b444e58f610c3ff3ecfcb702030ee3750b8bb30652b89ff7f293eccf801
4
896
"ocr_candidate": false, "language_guess": { "language": "mixed-de-en", "confidence": "medium", "german_hits": 60, "english_hits": 58 }, "excerpt": "Projektnummer: 22IF2603 Schuljahr: 2025/26 htl donaustadt Donaustadtstraße 45 1220 Wien office@htl-donaustadt.at www.htl-d...
diplomarbeit-ideen
.planning/corpus/content-samples.json
JSON
77cfb4432d653fc98b8d8a8f4993388e4559aff96e47f00027a3f0e92abf7298
5
896
": "DA-Antrag Vorlage Titel: GebärdenTrainer – Digitaler Einstieg in die Gebärdensprache Projektteam Name Individuelle Themenstellung (200 Zeichen) Stunden Daniel Ferenci Management eines Backendsystems, bestehend aus mehreren Programmiersprachen, am Beispiel von Python und Rust 180 Mahdi Afzali Analyse von Lernmethode...
diplomarbeit-ideen
.planning/corpus/content-samples.json
JSON
ec3d2fa28b422aed59e8c80e67ef0dc3ea63b457aac163737bb36e04600be5ae
6
896
Gebärdensprache zu erlernen Dolmetscher sind kostenintensiv Förderung der Inklusion Fähigkeiten unabhängig von formellen Kursen entwickeln Spielerisches Lernen unabhängig von Ort und Zeit Hintergrund Idee Lerninhalte: Kombination aus Videos und zugehörigen Wörtern Gamification: Entwicklung von spielerischen Lernmethode...
diplomarbeit-ideen
.planning/corpus/content-samples.json
JSON
1e4abe075612713a400cdabebaaec19e1baf866ee708054f07885a1102020e30
7
896
kombiniert Karteikarten mit einem prüfungsorientierten Ansatz, einem integrierten Wörterbuch und KI-gestützter Gebärdenerkennung, die Echtzeit-Feedback zur Gebärdenqualität gibt. Sie richtet sich an Gehörlose, Schwerhörige und alle, die Ge", "error": null }, { "relative_path": "_SYPCopilot-Share/syp...
diplomarbeit-ideen
.planning/corpus/content-samples.json
JSON
6e13c755b205227c9b0b34637aa6fde78897f763202d1eefded78eb7c5e6be8d
8
896
-Share/syp-projekte/nook/nook-ideenpraesentation.pdf", "project_slug": "nook", "parser": "pymupdf", "page_count": 12, "sampled_pages": 5, "sample_text_chars": 4, "chars_per_sampled_page": 0, "image_count_sample": 5, "images_per_sampled_page": 1.0, "text_yield": "non...
diplomarbeit-ideen
.planning/corpus/content-samples.json
JSON
eff413e759770d84d58effc741d87e5648a7ed391ac4e6616c716c9b857ca6f7
9
896
research identifies skill gaps within the team, pro", "error": null }, { "relative_path": "_SYPCopilot-Share/syp-projekte/openmask/openmask-antrag.pdf", "project_slug": "openmask", "parser": "pymupdf", "page_count": 4, "sampled_pages": 4, "sample_text_chars": 5930, ...
diplomarbeit-ideen
.planning/corpus/content-samples.json
JSON
6ddc10e16b73f9dc0dcc35e973b3c73db5b8266b05566d279a98ce59a5dacb89
10
896
/openmask-jahrbucheintrag.pdf", "project_slug": "openmask", "parser": "pymupdf", "page_count": 1, "sampled_pages": 1, "sample_text_chars": 850, "chars_per_sampled_page": 850, "image_count_sample": 7, "images_per_sampled_page": 7.0, "text_yield": "medium", "ocr...
diplomarbeit-ideen
.planning/corpus/content-samples.json
JSON
ca75850858f86adbcbe8004abdad3281c8336d5441bcfe29d5e2cd500b4b5499
11
896
: 2, "sample_text_chars": 4707, "chars_per_sampled_page": 2353, "image_count_sample": 0, "images_per_sampled_page": 0.0, "text_yield": "high", "ocr_candidate": false, "language_guess": { "language": "en", "confidence": "high", "german_hits": 10, ...
diplomarbeit-ideen
.planning/corpus/content-samples.json
JSON
700396c8f16cf0cb9730b6ce14585f954773f2337473c0c5d716852469c9fb83
12
896