MCPcopy Create free account
hub / github.com/altic-dev/Pilot / getInlinePickerScript

Method getInlinePickerScript

src/lib/picker-injector.ts:139–154  ·  view source on GitHub ↗

* Get the inline script content for direct injection * * This can be used to inject the picker script directly without * needing to load it from a separate file.

()

Source from the content-addressed store, hash-verified

137 * needing to load it from a separate file.
138 */
139 static async getInlinePickerScript(): Promise<string> {
140 try {
141 const fs = require('fs');
142 const path = require('path');
143 const pickerPath = path.join(
144 process.cwd(),
145 'public',
146 'picker',
147 'react-component-picker.js'
148 );
149 return fs.readFileSync(pickerPath, 'utf-8');
150 } catch (error) {
151 console.error('[PickerInjector] Error reading picker script:', error);
152 return '';
153 }
154 }
155
156 /**
157 * Validate if picker is supported for the given session

Callers 1

POSTFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected