|
|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
const express = require('express');
|
|
|
|
|
require('dotenv').config()
|
|
|
|
|
const dotenv = require('dotenv')
|
|
|
|
|
dotenv.config()
|
|
|
|
|
const fs = require('fs');
|
|
|
|
|
const { execSync } = require('child_process');
|
|
|
|
|
|
|
|
|
|
@ -11,6 +12,7 @@ app.use(cors());
|
|
|
|
|
|
|
|
|
|
app.post('/prompt', (req, res)=>{
|
|
|
|
|
|
|
|
|
|
dotenv.config({ override: true });
|
|
|
|
|
const resumeFlag = process.env.SESSIONID ? `--resume "${process.env.SESSIONID}"` : '';
|
|
|
|
|
const result = execSync(
|
|
|
|
|
`cd /home/matt/pathfinder && claude -p "${req.body.content}" ${resumeFlag} --output-format json --allowedTools "Bash(*)" "Read(*)" "Write(*)" "Edit(*)"`,
|
|
|
|
|
|