diff --git a/.changeset/soft-lies-cry.md b/.changeset/soft-lies-cry.md new file mode 100644 index 0000000000000000000000000000000000000000..1c5aa5cf4f34a84856d0ed7f39e4c59c14664624 --- /dev/null +++ b/.changeset/soft-lies-cry.md @@ -0,0 +1,5 @@ +--- +"create-llama": patch +--- + +Remove non-working file selectors for Linux diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 15df5c8bb6d9b1e9788d7b9e277f4ec6a0a863b3..7de9ade7d6d174ba8fd6c9922efc0c86b45ace50 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -17,7 +17,7 @@ jobs: matrix: node-version: [18, 20] python-version: ["3.11"] - os: [macos-latest, windows-latest] + os: [macos-latest, windows-latest, ubuntu-22.04] defaults: run: shell: bash diff --git a/create-app.ts b/create-app.ts index d8c5ae3ad127ca9433a67066c2fa707c71c1f374..008ab91bad3e62f8ddb94a50cc658f4c6d285316 100644 --- a/create-app.ts +++ b/create-app.ts @@ -151,5 +151,19 @@ export async function createApp({ ); } + if ( + dataSources.some((dataSource) => dataSource.type === "file") && + process.platform === "linux" + ) { + console.log( + yellow( + `You can add your own data files to ${terminalLink( + "data", + `file://${root}/data`, + )} folder manually.`, + ), + ); + } + console.log(); } diff --git a/questions.ts b/questions.ts index e240389815cf3aaaff6a704beeca45a4dc21d297..a635f711413c2ede75a04ec40b0263516ea03f02 100644 --- a/questions.ts +++ b/questions.ts @@ -136,24 +136,30 @@ export const getDataSourceChoices = ( value: "none", }); choices.push({ - title: "Use an example PDF", + title: + process.platform !== "linux" + ? "Use an example PDF" + : "Use an example PDF (you can add your own data files later)", value: "exampleFile", }); } - choices.push( - { - title: `Use local files (${supportedContextFileTypes.join(", ")})`, - value: "file", - }, - { - title: - process.platform === "win32" - ? "Use a local folder" - : "Use local folders", - value: "folder", - }, - ); + // Linux has many distros so we won't support file/folder picker for now + if (process.platform !== "linux") { + choices.push( + { + title: `Use local files (${supportedContextFileTypes.join(", ")})`, + value: "file", + }, + { + title: + process.platform === "win32" + ? "Use a local folder" + : "Use local folders", + value: "folder", + }, + ); + } if (framework === "fastapi") { choices.push({