Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cb01f0ae44 |
@@ -40479,7 +40479,7 @@ function query({
|
|||||||
// package.json
|
// package.json
|
||||||
var package_default = {
|
var package_default = {
|
||||||
name: "@pullfrog/action",
|
name: "@pullfrog/action",
|
||||||
version: "0.0.100",
|
version: "0.0.101",
|
||||||
type: "module",
|
type: "module",
|
||||||
files: [
|
files: [
|
||||||
"index.js",
|
"index.js",
|
||||||
@@ -42005,7 +42005,7 @@ var keyInputDefs = flatMorph(
|
|||||||
var Inputs = type({
|
var Inputs = type({
|
||||||
prompt: "string",
|
prompt: "string",
|
||||||
...keyInputDefs,
|
...keyInputDefs,
|
||||||
"agent?": AgentName
|
"agent?": AgentName.or("undefined")
|
||||||
});
|
});
|
||||||
async function main(inputs) {
|
async function main(inputs) {
|
||||||
let tokenToRevoke = null;
|
let tokenToRevoke = null;
|
||||||
@@ -42077,7 +42077,9 @@ async function run() {
|
|||||||
try {
|
try {
|
||||||
const inputs = {
|
const inputs = {
|
||||||
prompt: core3.getInput("prompt", { required: true }),
|
prompt: core3.getInput("prompt", { required: true }),
|
||||||
anthropic_api_key: core3.getInput("anthropic_api_key") || void 0
|
anthropic_api_key: core3.getInput("anthropic_api_key"),
|
||||||
|
openai_api_key: core3.getInput("openai_api_key"),
|
||||||
|
agent: core3.getInput("agent") ? AgentName.assert(core3.getInput("agent")) : void 0
|
||||||
};
|
};
|
||||||
const result = await main(inputs);
|
const result = await main(inputs);
|
||||||
if (!result.success) {
|
if (!result.success) {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import * as core from "@actions/core";
|
import * as core from "@actions/core";
|
||||||
import { type Inputs, main } from "./main.ts";
|
import { AgentName, type Inputs, main } from "./main.ts";
|
||||||
import { log } from "./utils/cli.ts";
|
import { log } from "./utils/cli.ts";
|
||||||
|
|
||||||
async function run(): Promise<void> {
|
async function run(): Promise<void> {
|
||||||
@@ -18,9 +18,11 @@ async function run(): Promise<void> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const inputs: Inputs = {
|
const inputs: Required<Inputs> = {
|
||||||
prompt: core.getInput("prompt", { required: true }),
|
prompt: core.getInput("prompt", { required: true }),
|
||||||
anthropic_api_key: core.getInput("anthropic_api_key") || undefined,
|
anthropic_api_key: core.getInput("anthropic_api_key"),
|
||||||
|
openai_api_key: core.getInput("openai_api_key"),
|
||||||
|
agent: core.getInput("agent") ? AgentName.assert(core.getInput("agent")) : undefined,
|
||||||
};
|
};
|
||||||
|
|
||||||
const result = await main(inputs);
|
const result = await main(inputs);
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ const keyInputDefs = flatMorph(
|
|||||||
export const Inputs = type({
|
export const Inputs = type({
|
||||||
prompt: "string",
|
prompt: "string",
|
||||||
...keyInputDefs,
|
...keyInputDefs,
|
||||||
"agent?": AgentName,
|
"agent?": AgentName.or("undefined"),
|
||||||
});
|
});
|
||||||
|
|
||||||
export type Inputs = typeof Inputs.infer;
|
export type Inputs = typeof Inputs.infer;
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pullfrog/action",
|
"name": "@pullfrog/action",
|
||||||
"version": "0.0.100",
|
"version": "0.0.101",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"files": [
|
"files": [
|
||||||
"index.js",
|
"index.js",
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export async function run(
|
|||||||
const originalCwd = process.cwd();
|
const originalCwd = process.cwd();
|
||||||
process.chdir(tempDir);
|
process.chdir(tempDir);
|
||||||
|
|
||||||
const inputs: Inputs = {
|
const inputs: Required<Inputs> = {
|
||||||
prompt,
|
prompt,
|
||||||
openai_api_key: process.env.OPENAI_API_KEY,
|
openai_api_key: process.env.OPENAI_API_KEY,
|
||||||
anthropic_api_key: process.env.ANTHROPIC_API_KEY,
|
anthropic_api_key: process.env.ANTHROPIC_API_KEY,
|
||||||
|
|||||||
Reference in New Issue
Block a user