This commit is contained in:
Aiqiao Yan
2025-04-17 20:13:47 +00:00
parent 43f6a3831f
commit f1591cfa68
4 changed files with 46 additions and 14 deletions

8
dist/index.js generated vendored
View File

@@ -33560,14 +33560,18 @@ const RESPONSE_FILE = 'modelResponse.txt';
async function run() {
try {
const promptFile = coreExports.getInput('prompt-file');
let prompt = coreExports.getInput('prompt');
const promptString = coreExports.getInput('prompt');
let prompt;
if (promptFile !== undefined && promptFile !== '') {
if (!fs.existsSync(promptFile)) {
throw new Error(`Prompt file not found: ${promptFile}`);
}
prompt = fs.readFileSync(promptFile, 'utf-8');
}
if (prompt === undefined || prompt === '') {
else if (promptString !== undefined && promptString !== '') {
prompt = promptString;
}
else {
throw new Error('prompt is not set');
}
const systemPrompt = coreExports.getInput('system-prompt');

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long