run-llama / LlamaIndexTS

Data framework for your LLM applications. Focus on server side solution
https://ts.llamaindex.ai
MIT License
1.92k stars 356 forks source link

Sweep: add svelte(kit) frontend option (in addition to react/next.js) #212

Open rawwerks opened 11 months ago

rawwerks commented 11 months ago

Details

...because svelte(kit) is so amazing

Checklist - [X] Create `packages/create-llama/templates/svelte` ✓ https://github.com/run-llama/LlamaIndexTS/commit/a7437d6d6f800854c3100468fe9e39901a6477f4 - [X] Modify `packages/create-llama/index.ts` ✓ https://github.com/run-llama/LlamaIndexTS/commit/d5be895de8714763cd794950ae710797a42e07d7 - [X] Modify `packages/create-llama/create-app.ts` ✓ https://github.com/run-llama/LlamaIndexTS/commit/aff5481fd1a1799be430673c4668a9587cb5a107 ![Flowchart](http://24.199.78.105:8082/public/ce0e5c7be1f17b9530403f695e2ee9762be7749c864638e990e2fb141aed7d3d_212_flowchart.svg)
sweep-ai[bot] commented 11 months ago

Here's the PR! https://github.com/run-llama/LlamaIndexTS/pull/213.

Sweep Basic Tier: I'm using GPT-4. You have 4 GPT-4 tickets left for the month and 2 for the day. (tracking ID: 95424b1a87)

For more GPT-4 tickets, visit our payment portal. For a one week free trial, try Sweep Pro (unlimited GPT-4 tickets).

Actions (click)

Sandbox Execution X

Here are the sandbox execution logs prior to making any changes:

Sandbox logs for 5975faf
pnpx prettier --write packages/create-llama/index.ts 1/3 ✓
Progress: resolved 1, reused 0, downloaded 0, added 0
Packages: +1
+
Progress: resolved 1, reused 1, downloaded 0, added 1, done
packages/create-llama/index.ts 510ms (unchanged)
pnpm eslint --fix packages/create-llama/index.ts 2/3 ✓
Warning: React version was set to "detect" in eslint-plugin-react settings, but the "react" package is not installed. Assuming latest React version for linting.
pnpx ts-node --type-check packages/create-llama/index.ts 3/3 ❌ (`1`)
Progress: resolved 1, reused 0, downloaded 0, added 0
Packages: +20
++++++++++++++++++++
Progress: resolved 20, reused 19, downloaded 0, added 13
Progress: resolved 20, reused 19, downloaded 1, added 19
Progress: resolved 20, reused 19, downloaded 1, added 20, done
/root/.local/share/pnpm/store/v3/tmp/dlx-90/node_modules/.pnpm/ts-node@10.9.1_@types+node@20.9.2_typescript@5.2.2/node_modules/ts-node/dist/index.js:851
            return old(m, filename);
                   ^
Error [ERR_REQUIRE_ESM]: require() of ES Module /repo/node_modules/.pnpm/terminal-link@3.0.0/node_modules/terminal-link/index.js from /repo/packages/create-llama/create-app.ts not supported.
Instead change the require of index.js in /repo/packages/create-llama/create-app.ts to a dynamic import() which is available in all CommonJS modules.
    at require.extensions. [as .js] (/root/.local/share/pnpm/store/v3/tmp/dlx-90/node_modules/.pnpm/ts-node@10.9.1_@types+node@20.9.2_typescript@5.2.2/node_modules/ts-node/dist/index.js:851:20)
    at Object. (/repo/packages/create-llama/create-app.ts:16:41)
    at m._compile (/root/.local/share/pnpm/store/v3/tmp/dlx-90/node_modules/.pnpm/ts-node@10.9.1_@types+node@20.9.2_typescript@5.2.2/node_modules/ts-node/dist/index.js:857:29)
    at require.extensions. [as .ts] (/root/.local/share/pnpm/store/v3/tmp/dlx-90/node_modules/.pnpm/ts-node@10.9.1_@types+node@20.9.2_typescript@5.2.2/node_modules/ts-node/dist/index.js:859:16)
    at Object. (/repo/packages/create-llama/index.ts:16:22)
    at m._compile (/root/.local/share/pnpm/store/v3/tmp/dlx-90/node_modules/.pnpm/ts-node@10.9.1_@types+node@20.9.2_typescript@5.2.2/node_modules/ts-node/dist/index.js:857:29)
    at require.extensions. [as .ts] (/root/.local/share/pnpm/store/v3/tmp/dlx-90/node_modules/.pnpm/ts-node@10.9.1_@types+node@20.9.2_typescript@5.2.2/node_modules/ts-node/dist/index.js:859:16)
    at phase4 (/root/.local/share/pnpm/store/v3/tmp/dlx-90/node_modules/.pnpm/ts-node@10.9.1_@types+node@20.9.2_typescript@5.2.2/node_modules/ts-node/dist/bin.js:466:20)
    at bootstrap (/root/.local/share/pnpm/store/v3/tmp/dlx-90/node_modules/.pnpm/ts-node@10.9.1_@types+node@20.9.2_typescript@5.2.2/node_modules/ts-node/dist/bin.js:54:12)
    at main (/root/.local/share/pnpm/store/v3/tmp/dlx-90/node_modules/.pnpm/ts-node@10.9.1_@types+node@20.9.2_typescript@5.2.2/node_modules/ts-node/dist/bin.js:33:12)
    at Object. (/root/.local/share/pnpm/store/v3/tmp/dlx-90/node_modules/.pnpm/ts-node@10.9.1_@types+node@20.9.2_typescript@5.2.2/node_modules/ts-node/dist/bin.js:579:5) {
  code: 'ERR_REQUIRE_ESM'
}

Sandbox failed, so all sandbox checks will be disabled for this issue.


Step 1: 🔎 Searching

I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.

Some code snippets I looked at (click to expand). If some file is missing from here, you can mention the path in the ticket description. https://github.com/run-llama/LlamaIndexTS/blob/5975fafefb22d6cca3e60eb226929563234f03c7/packages/create-llama/index.ts#L201-L280 https://github.com/run-llama/LlamaIndexTS/blob/5975fafefb22d6cca3e60eb226929563234f03c7/packages/create-llama/README.md#L1-L85

Step 2: ⌨️ Coding


Step 3: 🔁 Code Review

I have finished reviewing the code for completeness. I did not find errors for sweep/svelte-frontend-option.


🎉 Latest improvements to Sweep:


💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request. Join Our Discord