Add browser questionnaire foundation

Prepared with AI assistance.
This commit is contained in:
Abdul Wahab
2026-09-01 10:02:05 +05:00
parent 1f20997a6d
commit ba7f3c8891
15 changed files with 1140 additions and 18 deletions
+5 -2
View File
@@ -109,9 +109,11 @@ function readSkillScripts(scriptsDir) {
if (PER_PROJECT_SCRIPT_ARTIFACTS.has(entry.name)) continue;
const relPath = path.relative(scriptsDir, entryPath).split(path.sep).join('/');
const isBinary = ['.png', '.jpg', '.jpeg', '.gif', '.webp', '.ico', '.woff', '.woff2']
.includes(path.extname(entry.name).toLowerCase());
scripts.push({
name: relPath,
content: fs.readFileSync(entryPath, 'utf-8'),
content: fs.readFileSync(entryPath, isBinary ? undefined : 'utf-8'),
filePath: entryPath,
});
}
@@ -699,7 +701,8 @@ export function replacePlaceholders(content, provider, commandNames = [], allSki
* their command prefix from lib/provider.mjs, whose declaration is replaced
* here by an exact string match.
*/
export function replaceScriptProviderMarker(content, provider, buildProvider = provider) {
export function replaceScriptProviderMarker(content, provider) {
if (Buffer.isBuffer(content)) return content;
const placeholders = PROVIDER_PLACEHOLDERS[provider] || PROVIDER_PLACEHOLDERS.cursor;
const commandPrefix = placeholders.command_prefix || '/';
const prefixMarker = "export const IMPECCABLE_COMMAND_PREFIX = '/'; // @impeccable-provider-command-prefix";