refactor: Remove hardcoded paths for project and Claude Code executable in various scripts, fixes issue #23
This commit is contained in:
@@ -1098,7 +1098,6 @@ Skip routine operations:
|
|||||||
|----------|---------|---------|----------------|
|
|----------|---------|---------|----------------|
|
||||||
| `CLAUDE_MEM_MODEL` | `claude-sonnet-4-5` | AI model for processing | Invalid = SDK fails |
|
| `CLAUDE_MEM_MODEL` | `claude-sonnet-4-5` | AI model for processing | Invalid = SDK fails |
|
||||||
| `CLAUDE_MEM_WORKER_PORT` | `37777` | HTTP server port | Invalid = Worker won't start |
|
| `CLAUDE_MEM_WORKER_PORT` | `37777` | HTTP server port | Invalid = Worker won't start |
|
||||||
| `CLAUDE_CODE_PATH` | `/Users/alexnewman/.nvm/versions/node/v24.5.0/bin/claude` | Path to Claude Code | Invalid = SDK fails |
|
|
||||||
|
|
||||||
### Constants
|
### Constants
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -61,7 +61,7 @@ function buildTimestampMap(): TimestampMapping {
|
|||||||
const data = JSON.parse(line);
|
const data = JSON.parse(line);
|
||||||
const timestamp = data.timestamp;
|
const timestamp = data.timestamp;
|
||||||
const sessionId = data.sessionId;
|
const sessionId = data.sessionId;
|
||||||
const project = data.cwd || '/Users/alexnewman/Scripts/claude-mem';
|
const project = data.cwd;
|
||||||
|
|
||||||
if (timestamp && sessionId) {
|
if (timestamp && sessionId) {
|
||||||
// Round timestamp to second for matching with XML timestamps
|
// Round timestamp to second for matching with XML timestamps
|
||||||
|
|||||||
+1
-4
@@ -283,16 +283,13 @@ class SDKWorker {
|
|||||||
*/
|
*/
|
||||||
private async runSDKAgent(): Promise<void> {
|
private async runSDKAgent(): Promise<void> {
|
||||||
// Find Claude Code executable
|
// Find Claude Code executable
|
||||||
const claudePath = process.env.CLAUDE_CODE_PATH || '/Users/alexnewman/.nvm/versions/node/v24.5.0/bin/claude';
|
|
||||||
console.error(`[SDK Worker DEBUG] About to call query with claudePath: ${claudePath}`);
|
|
||||||
|
|
||||||
const queryResult = query({
|
const queryResult = query({
|
||||||
prompt: this.createMessageGenerator(),
|
prompt: this.createMessageGenerator(),
|
||||||
options: {
|
options: {
|
||||||
model: MODEL,
|
model: MODEL,
|
||||||
disallowedTools: DISALLOWED_TOOLS,
|
disallowedTools: DISALLOWED_TOOLS,
|
||||||
abortController: this.abortController,
|
abortController: this.abortController
|
||||||
pathToClaudeCodeExecutable: claudePath
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -345,16 +345,13 @@ class WorkerService {
|
|||||||
private async runSDKAgent(session: ActiveSession): Promise<void> {
|
private async runSDKAgent(session: ActiveSession): Promise<void> {
|
||||||
logger.info('SDK', 'Agent starting', { sessionId: session.sessionDbId });
|
logger.info('SDK', 'Agent starting', { sessionId: session.sessionDbId });
|
||||||
|
|
||||||
const claudePath = process.env.CLAUDE_CODE_PATH || '/Users/alexnewman/.nvm/versions/node/v24.5.0/bin/claude';
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const queryResult = query({
|
const queryResult = query({
|
||||||
prompt: this.createMessageGenerator(session),
|
prompt: this.createMessageGenerator(session),
|
||||||
options: {
|
options: {
|
||||||
model: MODEL,
|
model: MODEL,
|
||||||
disallowedTools: DISALLOWED_TOOLS,
|
disallowedTools: DISALLOWED_TOOLS,
|
||||||
abortController: session.abortController,
|
abortController: session.abortController
|
||||||
pathToClaudeCodeExecutable: claudePath
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user