@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
21 lines • 1.03 kB
JavaScript
import { createHeadlessProjectTrustContext } from "./project-trust-headless.js";
import { showStartupInput, showStartupSelector } from "./startup-ui.js";
export function createProjectTrustContext(options) {
const headless = createHeadlessProjectTrustContext(options);
if (!options.hasUI || options.mode !== "interactive") {
return headless;
}
return {
...headless,
ui: {
...headless.ui,
select: async (title, selectOptions) => showStartupSelector(options.settingsManager, title, selectOptions.map((option) => ({ label: option, value: option }))),
confirm: async (title, message) => (await showStartupSelector(options.settingsManager, `${title}\n${message}`, [
{ label: "Yes", value: true },
{ label: "No", value: false },
])) ?? false,
input: async (title, placeholder) => showStartupInput(options.settingsManager, title, placeholder),
},
};
}
//# sourceMappingURL=project-trust.js.map