-
Notifications
You must be signed in to change notification settings - Fork 182
simplify questions asked #370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 12 commits
c89e85b
571a8c3
5ba4b3b
6e51bcd
b7af207
3bb5af8
f00cb5a
56088bd
4e60077
e3b54e6
40b9c01
ff2d1a1
40dc3a4
24fcde5
8539c7d
4015c15
f886e31
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,7 +1,6 @@ | ||||||||||||||||||||||||||||||||||||||||||||||
/* eslint-disable import/no-extraneous-dependencies */ | ||||||||||||||||||||||||||||||||||||||||||||||
import { execSync } from "child_process"; | ||||||||||||||||||||||||||||||||||||||||||||||
import Commander from "commander"; | ||||||||||||||||||||||||||||||||||||||||||||||
import Conf from "conf"; | ||||||||||||||||||||||||||||||||||||||||||||||
import { Command } from "commander"; | ||||||||||||||||||||||||||||||||||||||||||||||
import fs from "fs"; | ||||||||||||||||||||||||||||||||||||||||||||||
import path from "path"; | ||||||||||||||||||||||||||||||||||||||||||||||
import { bold, cyan, green, red, yellow } from "picocolors"; | ||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -17,8 +16,9 @@ import { runApp } from "./helpers/run-app"; | |||||||||||||||||||||||||||||||||||||||||||||
import { getTools } from "./helpers/tools"; | ||||||||||||||||||||||||||||||||||||||||||||||
import { validateNpmName } from "./helpers/validate-pkg"; | ||||||||||||||||||||||||||||||||||||||||||||||
import packageJson from "./package.json"; | ||||||||||||||||||||||||||||||||||||||||||||||
import { QuestionArgs, askQuestions, onPromptState } from "./questions"; | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
import { askQuestions } from "./questions/index"; | ||||||||||||||||||||||||||||||||||||||||||||||
import { QuestionArgs } from "./questions/types"; | ||||||||||||||||||||||||||||||||||||||||||||||
import { onPromptState } from "./questions/utils"; | ||||||||||||||||||||||||||||||||||||||||||||||
// Run the initialization function | ||||||||||||||||||||||||||||||||||||||||||||||
initializeGlobalAgent(); | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -29,12 +29,14 @@ const handleSigTerm = () => process.exit(0); | |||||||||||||||||||||||||||||||||||||||||||||
process.on("SIGINT", handleSigTerm); | ||||||||||||||||||||||||||||||||||||||||||||||
process.on("SIGTERM", handleSigTerm); | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
const program = new Commander.Command(packageJson.name) | ||||||||||||||||||||||||||||||||||||||||||||||
const program = new Command(packageJson.name) | ||||||||||||||||||||||||||||||||||||||||||||||
.version(packageJson.version) | ||||||||||||||||||||||||||||||||||||||||||||||
.arguments("<project-directory>") | ||||||||||||||||||||||||||||||||||||||||||||||
.usage(`${green("<project-directory>")} [options]`) | ||||||||||||||||||||||||||||||||||||||||||||||
.arguments("[project-directory]") | ||||||||||||||||||||||||||||||||||||||||||||||
.usage(`${green("[project-directory]")} [options]`) | ||||||||||||||||||||||||||||||||||||||||||||||
.action((name) => { | ||||||||||||||||||||||||||||||||||||||||||||||
projectPath = name; | ||||||||||||||||||||||||||||||||||||||||||||||
if (name) { | ||||||||||||||||||||||||||||||||||||||||||||||
projectPath = name; | ||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||
}) | ||||||||||||||||||||||||||||||||||||||||||||||
.option( | ||||||||||||||||||||||||||||||||||||||||||||||
"--use-npm", | ||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -55,13 +57,6 @@ const program = new Commander.Command(packageJson.name) | |||||||||||||||||||||||||||||||||||||||||||||
` | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
Explicitly tell the CLI to bootstrap the application using Yarn | ||||||||||||||||||||||||||||||||||||||||||||||
`, | ||||||||||||||||||||||||||||||||||||||||||||||
) | ||||||||||||||||||||||||||||||||||||||||||||||
.option( | ||||||||||||||||||||||||||||||||||||||||||||||
"--reset-preferences", | ||||||||||||||||||||||||||||||||||||||||||||||
` | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
Explicitly tell the CLI to reset any stored preferences | ||||||||||||||||||||||||||||||||||||||||||||||
`, | ||||||||||||||||||||||||||||||||||||||||||||||
) | ||||||||||||||||||||||||||||||||||||||||||||||
.option( | ||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -124,7 +119,14 @@ const program = new Commander.Command(packageJson.name) | |||||||||||||||||||||||||||||||||||||||||||||
"--frontend", | ||||||||||||||||||||||||||||||||||||||||||||||
` | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
Whether to generate a frontend for your backend. | ||||||||||||||||||||||||||||||||||||||||||||||
Generate a frontend for your backend. | ||||||||||||||||||||||||||||||||||||||||||||||
`, | ||||||||||||||||||||||||||||||||||||||||||||||
) | ||||||||||||||||||||||||||||||||||||||||||||||
.option( | ||||||||||||||||||||||||||||||||||||||||||||||
"--no-frontend", | ||||||||||||||||||||||||||||||||||||||||||||||
` | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
Do not generate a frontend for your backend. | ||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+122
to
+129
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Approve new frontend options, but fix formatting. The addition of Please apply the following diff to correct the formatting: .option(
"--frontend",
- `
- Generate a frontend for your backend.
-`,
+ `
+
+ Generate a frontend for your backend.
+`
)
.option(
"--no-frontend",
- `
-
- Do not generate a frontend for your backend.
-`,
+ `
+
+ Do not generate a frontend for your backend.
+`
) This adjustment ensures that the option descriptions are properly formatted and consistent with other options. 📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||
`, | ||||||||||||||||||||||||||||||||||||||||||||||
) | ||||||||||||||||||||||||||||||||||||||||||||||
.option( | ||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -161,6 +163,13 @@ const program = new Commander.Command(packageJson.name) | |||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
Specify the tools you want to use by providing a comma-separated list. For example, 'wikipedia.WikipediaToolSpec,google.GoogleSearchToolSpec'. Use 'none' to not using any tools. | ||||||||||||||||||||||||||||||||||||||||||||||
`, | ||||||||||||||||||||||||||||||||||||||||||||||
(tools, _) => { | ||||||||||||||||||||||||||||||||||||||||||||||
if (tools === "none") { | ||||||||||||||||||||||||||||||||||||||||||||||
return []; | ||||||||||||||||||||||||||||||||||||||||||||||
} else { | ||||||||||||||||||||||||||||||||||||||||||||||
return getTools(tools.split(",")); | ||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||
) | ||||||||||||||||||||||||||||||||||||||||||||||
.option( | ||||||||||||||||||||||||||||||||||||||||||||||
"--use-llama-parse", | ||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -189,86 +198,71 @@ const program = new Commander.Command(packageJson.name) | |||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
Allow interactive selection of LLM and embedding models of different model providers. | ||||||||||||||||||||||||||||||||||||||||||||||
`, | ||||||||||||||||||||||||||||||||||||||||||||||
false, | ||||||||||||||||||||||||||||||||||||||||||||||
) | ||||||||||||||||||||||||||||||||||||||||||||||
.option( | ||||||||||||||||||||||||||||||||||||||||||||||
"--ask-examples", | ||||||||||||||||||||||||||||||||||||||||||||||
"--pro", | ||||||||||||||||||||||||||||||||||||||||||||||
` | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
Allow interactive selection of community templates and LlamaPacks. | ||||||||||||||||||||||||||||||||||||||||||||||
Allow interactive selection of all features. | ||||||||||||||||||||||||||||||||||||||||||||||
`, | ||||||||||||||||||||||||||||||||||||||||||||||
false, | ||||||||||||||||||||||||||||||||||||||||||||||
) | ||||||||||||||||||||||||||||||||||||||||||||||
.allowUnknownOption() | ||||||||||||||||||||||||||||||||||||||||||||||
.parse(process.argv); | ||||||||||||||||||||||||||||||||||||||||||||||
if (process.argv.includes("--no-frontend")) { | ||||||||||||||||||||||||||||||||||||||||||||||
program.frontend = false; | ||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||
if (process.argv.includes("--tools")) { | ||||||||||||||||||||||||||||||||||||||||||||||
if (program.tools === "none") { | ||||||||||||||||||||||||||||||||||||||||||||||
program.tools = []; | ||||||||||||||||||||||||||||||||||||||||||||||
} else { | ||||||||||||||||||||||||||||||||||||||||||||||
program.tools = getTools(program.tools.split(",")); | ||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
const options = program.opts(); | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
if ( | ||||||||||||||||||||||||||||||||||||||||||||||
process.argv.includes("--no-llama-parse") || | ||||||||||||||||||||||||||||||||||||||||||||||
program.template === "extractor" | ||||||||||||||||||||||||||||||||||||||||||||||
options.template === "extractor" | ||||||||||||||||||||||||||||||||||||||||||||||
) { | ||||||||||||||||||||||||||||||||||||||||||||||
program.useLlamaParse = false; | ||||||||||||||||||||||||||||||||||||||||||||||
options.useLlamaParse = false; | ||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||
program.askModels = process.argv.includes("--ask-models"); | ||||||||||||||||||||||||||||||||||||||||||||||
program.askExamples = process.argv.includes("--ask-examples"); | ||||||||||||||||||||||||||||||||||||||||||||||
if (process.argv.includes("--no-files")) { | ||||||||||||||||||||||||||||||||||||||||||||||
program.dataSources = []; | ||||||||||||||||||||||||||||||||||||||||||||||
options.dataSources = []; | ||||||||||||||||||||||||||||||||||||||||||||||
} else if (process.argv.includes("--example-file")) { | ||||||||||||||||||||||||||||||||||||||||||||||
program.dataSources = getDataSources(program.files, program.exampleFile); | ||||||||||||||||||||||||||||||||||||||||||||||
options.dataSources = getDataSources(options.files, options.exampleFile); | ||||||||||||||||||||||||||||||||||||||||||||||
} else if (process.argv.includes("--llamacloud")) { | ||||||||||||||||||||||||||||||||||||||||||||||
program.dataSources = [ | ||||||||||||||||||||||||||||||||||||||||||||||
options.dataSources = [ | ||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||
type: "llamacloud", | ||||||||||||||||||||||||||||||||||||||||||||||
config: {}, | ||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||
EXAMPLE_FILE, | ||||||||||||||||||||||||||||||||||||||||||||||
]; | ||||||||||||||||||||||||||||||||||||||||||||||
} else if (process.argv.includes("--web-source")) { | ||||||||||||||||||||||||||||||||||||||||||||||
program.dataSources = [ | ||||||||||||||||||||||||||||||||||||||||||||||
options.dataSources = [ | ||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||
type: "web", | ||||||||||||||||||||||||||||||||||||||||||||||
config: { | ||||||||||||||||||||||||||||||||||||||||||||||
baseUrl: program.webSource, | ||||||||||||||||||||||||||||||||||||||||||||||
prefix: program.webSource, | ||||||||||||||||||||||||||||||||||||||||||||||
baseUrl: options.webSource, | ||||||||||||||||||||||||||||||||||||||||||||||
prefix: options.webSource, | ||||||||||||||||||||||||||||||||||||||||||||||
depth: 1, | ||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||
]; | ||||||||||||||||||||||||||||||||||||||||||||||
} else if (process.argv.includes("--db-source")) { | ||||||||||||||||||||||||||||||||||||||||||||||
program.dataSources = [ | ||||||||||||||||||||||||||||||||||||||||||||||
options.dataSources = [ | ||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||
type: "db", | ||||||||||||||||||||||||||||||||||||||||||||||
config: { | ||||||||||||||||||||||||||||||||||||||||||||||
uri: program.dbSource, | ||||||||||||||||||||||||||||||||||||||||||||||
queries: program.dbQuery || "SELECT * FROM mytable", | ||||||||||||||||||||||||||||||||||||||||||||||
uri: options.dbSource, | ||||||||||||||||||||||||||||||||||||||||||||||
queries: options.dbQuery || "SELECT * FROM mytable", | ||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||
]; | ||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
const packageManager = !!program.useNpm | ||||||||||||||||||||||||||||||||||||||||||||||
const packageManager = !!options.useNpm | ||||||||||||||||||||||||||||||||||||||||||||||
? "npm" | ||||||||||||||||||||||||||||||||||||||||||||||
: !!program.usePnpm | ||||||||||||||||||||||||||||||||||||||||||||||
: !!options.usePnpm | ||||||||||||||||||||||||||||||||||||||||||||||
? "pnpm" | ||||||||||||||||||||||||||||||||||||||||||||||
: !!program.useYarn | ||||||||||||||||||||||||||||||||||||||||||||||
: !!options.useYarn | ||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+252
to
+256
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Simplify package manager detection logic. The current implementation uses unnecessary double negation operators. These can be safely removed to improve code clarity without changing the functionality. Apply the following diff to simplify the package manager detection: -const packageManager = !!options.useNpm
+const packageManager = options.useNpm
? "npm"
- : !!options.usePnpm
+ : options.usePnpm
? "pnpm"
- : !!options.useYarn
+ : options.useYarn
? "yarn"
: getPkgManager(); This change aligns with the static analysis suggestions and makes the code more straightforward. 📝 Committable suggestion
Suggested change
🧰 Tools🪛 Biome
|
||||||||||||||||||||||||||||||||||||||||||||||
? "yarn" | ||||||||||||||||||||||||||||||||||||||||||||||
: getPkgManager(); | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
async function run(): Promise<void> { | ||||||||||||||||||||||||||||||||||||||||||||||
const conf = new Conf({ projectName: "create-llama" }); | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
if (program.resetPreferences) { | ||||||||||||||||||||||||||||||||||||||||||||||
conf.clear(); | ||||||||||||||||||||||||||||||||||||||||||||||
console.log(`Preferences reset successfully`); | ||||||||||||||||||||||||||||||||||||||||||||||
return; | ||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
if (typeof projectPath === "string") { | ||||||||||||||||||||||||||||||||||||||||||||||
projectPath = projectPath.trim(); | ||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -331,35 +325,16 @@ async function run(): Promise<void> { | |||||||||||||||||||||||||||||||||||||||||||||
process.exit(1); | ||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
const preferences = (conf.get("preferences") || {}) as QuestionArgs; | ||||||||||||||||||||||||||||||||||||||||||||||
await askQuestions( | ||||||||||||||||||||||||||||||||||||||||||||||
program as unknown as QuestionArgs, | ||||||||||||||||||||||||||||||||||||||||||||||
preferences, | ||||||||||||||||||||||||||||||||||||||||||||||
program.openAiKey, | ||||||||||||||||||||||||||||||||||||||||||||||
); | ||||||||||||||||||||||||||||||||||||||||||||||
const answers = await askQuestions(options as unknown as QuestionArgs); | ||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Improve type safety in The current implementation uses type casting, which could potentially hide type mismatches and reduce type safety. Consider refactoring this to avoid the use of type casting. Here are a couple of approaches:
const questionArgs: QuestionArgs = {
// Map relevant properties from options to QuestionArgs
};
const answers = await askQuestions(questionArgs);
function askQuestions(options: Partial<QuestionArgs> & Record<string, unknown>): Promise<Answers> {
// Implementation
}
const answers = await askQuestions(options); These approaches would maintain type safety and make the code more robust. |
||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
await createApp({ | ||||||||||||||||||||||||||||||||||||||||||||||
template: program.template, | ||||||||||||||||||||||||||||||||||||||||||||||
framework: program.framework, | ||||||||||||||||||||||||||||||||||||||||||||||
ui: program.ui, | ||||||||||||||||||||||||||||||||||||||||||||||
...answers, | ||||||||||||||||||||||||||||||||||||||||||||||
appPath: resolvedProjectPath, | ||||||||||||||||||||||||||||||||||||||||||||||
packageManager, | ||||||||||||||||||||||||||||||||||||||||||||||
frontend: program.frontend, | ||||||||||||||||||||||||||||||||||||||||||||||
modelConfig: program.modelConfig, | ||||||||||||||||||||||||||||||||||||||||||||||
llamaCloudKey: program.llamaCloudKey, | ||||||||||||||||||||||||||||||||||||||||||||||
communityProjectConfig: program.communityProjectConfig, | ||||||||||||||||||||||||||||||||||||||||||||||
llamapack: program.llamapack, | ||||||||||||||||||||||||||||||||||||||||||||||
vectorDb: program.vectorDb, | ||||||||||||||||||||||||||||||||||||||||||||||
externalPort: program.externalPort, | ||||||||||||||||||||||||||||||||||||||||||||||
postInstallAction: program.postInstallAction, | ||||||||||||||||||||||||||||||||||||||||||||||
dataSources: program.dataSources, | ||||||||||||||||||||||||||||||||||||||||||||||
tools: program.tools, | ||||||||||||||||||||||||||||||||||||||||||||||
useLlamaParse: program.useLlamaParse, | ||||||||||||||||||||||||||||||||||||||||||||||
observability: program.observability, | ||||||||||||||||||||||||||||||||||||||||||||||
externalPort: options.externalPort, | ||||||||||||||||||||||||||||||||||||||||||||||
}); | ||||||||||||||||||||||||||||||||||||||||||||||
conf.set("preferences", preferences); | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
if (program.postInstallAction === "VSCode") { | ||||||||||||||||||||||||||||||||||||||||||||||
if (answers.postInstallAction === "VSCode") { | ||||||||||||||||||||||||||||||||||||||||||||||
console.log(`Starting VSCode in ${root}...`); | ||||||||||||||||||||||||||||||||||||||||||||||
try { | ||||||||||||||||||||||||||||||||||||||||||||||
execSync(`code . --new-window --goto README.md`, { | ||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -383,15 +358,15 @@ Please check ${cyan( | |||||||||||||||||||||||||||||||||||||||||||||
)} for more information.`, | ||||||||||||||||||||||||||||||||||||||||||||||
); | ||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||
} else if (program.postInstallAction === "runApp") { | ||||||||||||||||||||||||||||||||||||||||||||||
} else if (answers.postInstallAction === "runApp") { | ||||||||||||||||||||||||||||||||||||||||||||||
console.log(`Running app in ${root}...`); | ||||||||||||||||||||||||||||||||||||||||||||||
await runApp( | ||||||||||||||||||||||||||||||||||||||||||||||
root, | ||||||||||||||||||||||||||||||||||||||||||||||
program.template, | ||||||||||||||||||||||||||||||||||||||||||||||
program.frontend, | ||||||||||||||||||||||||||||||||||||||||||||||
program.framework, | ||||||||||||||||||||||||||||||||||||||||||||||
program.port, | ||||||||||||||||||||||||||||||||||||||||||||||
program.externalPort, | ||||||||||||||||||||||||||||||||||||||||||||||
answers.template, | ||||||||||||||||||||||||||||||||||||||||||||||
answers.frontend, | ||||||||||||||||||||||||||||||||||||||||||||||
answers.framework, | ||||||||||||||||||||||||||||||||||||||||||||||
options.port, | ||||||||||||||||||||||||||||||||||||||||||||||
options.externalPort, | ||||||||||||||||||||||||||||||||||||||||||||||
); | ||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Import Verification Failed
The
toChoice
function was not found in the specified path../../questions/utils
. Please ensure that the function is correctly exported fromquestions/utils.ts
or update the import path accordingly.🔗 Analysis chain
LGTM! Verify the new import path.
The import statement has been updated to a more specific path, which is a good practice for better code organization. This change should improve the modularity of the codebase.
Let's verify that the imported functions exist in the new location:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 443