@aiderdesk/aiderdesk 0.72.0 → 0.73.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/cli.js +982 -13
- package/out/renderer/assets/{AgentSettings-CEw1Tgyu.js → AgentSettings-B8NFKgLb.js} +2 -2
- package/out/renderer/assets/{InfoIcon-B6bij_VJ.js → InfoIcon-DhMP8XnB.js} +1 -1
- package/out/renderer/assets/{Onboarding-C2CtQOko.js → Onboarding-CmlEw4fh.js} +4 -4
- package/out/renderer/assets/{ProviderHeader-BCrdzdGT.js → ProviderHeader-DMNcKpGs.js} +83 -275
- package/out/renderer/assets/{SettingsPage-CNCsKRS7.js → SettingsPage-CmOR4wA1.js} +7 -7
- package/out/renderer/assets/{UsageDashboard-DtZ8GTj6.js → UsageDashboard-BGAWd1b2.js} +3 -3
- package/out/renderer/assets/{arc-DnyT8oZ2.js → arc-Jg3VSYdu.js} +1 -1
- package/out/renderer/assets/{architectureDiagram-3BPJPVTR-Dus_2n--.js → architectureDiagram-3BPJPVTR-BhT1Ad0h.js} +3 -3
- package/out/renderer/assets/{blockDiagram-GPEHLZMM-A3REgcbw.js → blockDiagram-GPEHLZMM-BZuMX6U_.js} +4 -4
- package/out/renderer/assets/{c4Diagram-AAUBKEIU-DksErR7z.js → c4Diagram-AAUBKEIU-QL7T5rpZ.js} +2 -2
- package/out/renderer/assets/{channel-DkjNDJNa.js → channel-K2W31OE5.js} +1 -1
- package/out/renderer/assets/{chunk-2J33WTMH-CrUC6pnQ.js → chunk-2J33WTMH-LumY2cbE.js} +1 -1
- package/out/renderer/assets/{chunk-4BX2VUAB-BulXGa1B.js → chunk-4BX2VUAB-GLhRzKG1.js} +1 -1
- package/out/renderer/assets/{chunk-55IACEB6-pQjPbAe9.js → chunk-55IACEB6-B3B3AcnH.js} +1 -1
- package/out/renderer/assets/{chunk-727SXJPM-BcqphFMh.js → chunk-727SXJPM-DMyZUEKf.js} +5 -5
- package/out/renderer/assets/{chunk-AQP2D5EJ-DCREtqoW.js → chunk-AQP2D5EJ-CQsD5TCd.js} +3 -3
- package/out/renderer/assets/{chunk-FMBD7UC4-LFUgit2t.js → chunk-FMBD7UC4-x4SmU5Oe.js} +1 -1
- package/out/renderer/assets/{chunk-ND2GUHAM-Bkunzp-9.js → chunk-ND2GUHAM-pT6s9nFT.js} +1 -1
- package/out/renderer/assets/{chunk-QZHKN3VN-foWYS4_y.js → chunk-QZHKN3VN-Cv8umQxL.js} +1 -1
- package/out/renderer/assets/{classDiagram-4FO5ZUOK-CVbKiC6R.js → classDiagram-4FO5ZUOK-DmOcXaER.js} +6 -6
- package/out/renderer/assets/{classDiagram-v2-Q7XG4LA2-CVbKiC6R.js → classDiagram-v2-Q7XG4LA2-DmOcXaER.js} +6 -6
- package/out/renderer/assets/{cose-bilkent-S5V4N54A-Bw7reEuM.js → cose-bilkent-S5V4N54A-Bi6ESdxa.js} +1 -1
- package/out/renderer/assets/{dagre-BM42HDAG-oGURKg82.js → dagre-BM42HDAG-BK2slT53.js} +3 -3
- package/out/renderer/assets/{diagram-2AECGRRQ-kaoJ1YpU.js → diagram-2AECGRRQ-DkgLH6e2.js} +3 -3
- package/out/renderer/assets/{diagram-5GNKFQAL-EvoHkNwk.js → diagram-5GNKFQAL-BwAieVd0.js} +4 -4
- package/out/renderer/assets/{diagram-KO2AKTUF-D5N5hwBV.js → diagram-KO2AKTUF-D6Km_LB9.js} +3 -3
- package/out/renderer/assets/{diagram-LMA3HP47-kKi9mSGe.js → diagram-LMA3HP47-BhWSHEeO.js} +3 -3
- package/out/renderer/assets/{diagram-OG6HWLK6-BWJ9L5AP.js → diagram-OG6HWLK6-zoN4RvNr.js} +4 -4
- package/out/renderer/assets/{erDiagram-TEJ5UH35-d1W9ONuu.js → erDiagram-TEJ5UH35-DooZS_mc.js} +4 -4
- package/out/renderer/assets/{flowDiagram-I6XJVG4X-u5Xk-TTj.js → flowDiagram-I6XJVG4X-CmZPvaDJ.js} +6 -6
- package/out/renderer/assets/{ganttDiagram-6RSMTGT7-DiheBMSM.js → ganttDiagram-6RSMTGT7-Bx6OJzRM.js} +3 -3
- package/out/renderer/assets/{gitGraphDiagram-PVQCEYII-B7hUlCNM.js → gitGraphDiagram-PVQCEYII-BPUT8Ht7.js} +4 -4
- package/out/renderer/assets/{graph-D7JlCUW0.js → graph-CwC0h_b8.js} +1 -1
- package/out/renderer/assets/{index-DJwDiyPe.css → index-B3o44aT2.css} +0 -24
- package/out/renderer/assets/{index-3OKQF96N.js → index-BSFaA4XQ.js} +1 -1
- package/out/renderer/assets/{index-gnQtDa4r.js → index-BrZFlbuf.js} +1 -1
- package/out/renderer/assets/{index-biM8l5ZN.js → index-CI0IUNzz.js} +9458 -1795
- package/out/renderer/assets/{index-BgXUknVd.js → index-CXq4cCbe.js} +5 -4
- package/out/renderer/assets/{index-D8P2TG70.js → index-ChKmR4QP.js} +1 -1
- package/out/renderer/assets/{index-DcFrLBMu.js → index-DOOlJc12.js} +1 -1
- package/out/renderer/assets/{index-DOl0MdBC.js → index-DqiktxfT.js} +1 -1
- package/out/renderer/assets/{index-ClS76F34.js → index-Ds5GQdTm.js} +1 -1
- package/out/renderer/assets/{index-CzGef_M5.js → index-PGLvyST0.js} +1 -1
- package/out/renderer/assets/{index-Duwg55fn.js → index-xI0MsLE8.js} +1 -1
- package/out/renderer/assets/{infoDiagram-5YYISTIA-BNOwcP8d.js → infoDiagram-5YYISTIA-C77gIx1a.js} +2 -2
- package/out/renderer/assets/{ishikawaDiagram-YF4QCWOH-DZGvMXcI.js → ishikawaDiagram-YF4QCWOH-DZ8xk7_N.js} +1 -1
- package/out/renderer/assets/{journeyDiagram-JHISSGLW-BF-SCAHN.js → journeyDiagram-JHISSGLW-BLPdv_c5.js} +4 -4
- package/out/renderer/assets/{jsx-dev-runtime-BZnUoQef.js → jsx-dev-runtime-1M6DZ35g.js} +1 -1
- package/out/renderer/assets/{kanban-definition-UN3LZRKU-Cp9SfO9v.js → kanban-definition-UN3LZRKU-CMHVN7c3.js} +2 -2
- package/out/renderer/assets/{layout-BxWwRUTm.js → layout-BJqshyQm.js} +2 -2
- package/out/renderer/assets/{linear-Cpdxqlgb.js → linear-CbEhS1qE.js} +1 -1
- package/out/renderer/assets/{mindmap-definition-RKZ34NQL-BtGsJF8k.js → mindmap-definition-RKZ34NQL-C8Cz7pQU.js} +3 -3
- package/out/renderer/assets/{pieDiagram-4H26LBE5-choZS41J.js → pieDiagram-4H26LBE5-Bx5tSw6i.js} +4 -4
- package/out/renderer/assets/{quadrantDiagram-W4KKPZXB-CSEwIgFD.js → quadrantDiagram-W4KKPZXB-CX6DcDEk.js} +2 -2
- package/out/renderer/assets/{requirementDiagram-4Y6WPE33-sCdLoMf0.js → requirementDiagram-4Y6WPE33-qBp8nKy9.js} +3 -3
- package/out/renderer/assets/{sankeyDiagram-5OEKKPKP-DunA5v4o.js → sankeyDiagram-5OEKKPKP-B5zYIsBo.js} +1 -1
- package/out/renderer/assets/{sequenceDiagram-3UESZ5HK-Cwz8rZA1.js → sequenceDiagram-3UESZ5HK-C57DtTdH.js} +3 -3
- package/out/renderer/assets/{stateDiagram-AJRCARHV-VCMhb3e-.js → stateDiagram-AJRCARHV-CGRyr6CG.js} +6 -6
- package/out/renderer/assets/{stateDiagram-v2-BHNVJYJU-B9OcfdsH.js → stateDiagram-v2-BHNVJYJU-3hvBe5lv.js} +4 -4
- package/out/renderer/assets/{time-CtsiuOCL.js → time-B3bXse3U.js} +1 -1
- package/out/renderer/assets/{timeline-definition-PNZ67QCA-B36Hc_gQ.js → timeline-definition-PNZ67QCA-Dpq0iPd0.js} +2 -2
- package/out/renderer/assets/{vennDiagram-CIIHVFJN-Dt2oWHz0.js → vennDiagram-CIIHVFJN-_jSNuVb5.js} +1 -1
- package/out/renderer/assets/{wardley-L42UT6IY-DkWaUY9X.js → wardley-L42UT6IY-DixmVaQZ.js} +1 -1
- package/out/renderer/assets/{wardleyDiagram-YWT4CUSO-BHFM3JNH.js → wardleyDiagram-YWT4CUSO-DMK4zc32.js} +3 -3
- package/out/renderer/assets/{xychartDiagram-2RQKCTM6-2wqqMVJ7.js → xychartDiagram-2RQKCTM6-DKPuWmAF.js} +2 -2
- package/out/renderer/index.html +2 -2
- package/out/resources/skills/extension-creator/SKILL.md +5 -5
- package/out/resources/skills/extension-creator/references/in-repo-flow.md +4 -4
- package/out/resources/skills/extension-creator/references/install-targets.md +2 -2
- package/out/resources/skills/extension-creator/references/project-global-flow.md +1 -1
- package/out/runner.js +115 -58
- package/package.json +3 -2
- package/scripts/generate-package.mjs +1 -0
package/out/runner.js
CHANGED
|
@@ -1122,6 +1122,10 @@ class ShellDetector {
|
|
|
1122
1122
|
}
|
|
1123
1123
|
}
|
|
1124
1124
|
const getPathSeparator = () => process.platform === "win32" ? ";" : ":";
|
|
1125
|
+
const extractPathFromOutput = (output) => {
|
|
1126
|
+
const lines = output.split("\n").filter((line) => line.trim().length > 0);
|
|
1127
|
+
return (lines[lines.length - 1] || "").trim();
|
|
1128
|
+
};
|
|
1125
1129
|
const getShellPath = () => {
|
|
1126
1130
|
if (cachedPath && !isFirstCall) {
|
|
1127
1131
|
return cachedPath;
|
|
@@ -1175,32 +1179,13 @@ const getShellPath = () => {
|
|
|
1175
1179
|
let sourceCommand = "";
|
|
1176
1180
|
const homeDir = os__namespace.homedir();
|
|
1177
1181
|
if (shell.includes("zsh")) {
|
|
1178
|
-
sourceCommand = `source /etc/zprofile
|
|
1182
|
+
sourceCommand = `source /etc/zprofile >/dev/null 2>&1 || true; source ${homeDir}/.zprofile >/dev/null 2>&1 || true; source /etc/zshrc >/dev/null 2>&1 || true; source ${homeDir}/.zshrc >/dev/null 2>&1 || true; `;
|
|
1179
1183
|
} else if (shell.includes("bash")) {
|
|
1180
|
-
sourceCommand = `source /etc/profile
|
|
1184
|
+
sourceCommand = `source /etc/profile >/dev/null 2>&1 || true; source ${homeDir}/.bash_profile >/dev/null 2>&1 || true; source ${homeDir}/.bashrc >/dev/null 2>&1 || true; `;
|
|
1181
1185
|
}
|
|
1182
1186
|
const fullCommand = `${shell} -c '${sourceCommand}echo $PATH'`;
|
|
1183
|
-
shellPath =
|
|
1184
|
-
|
|
1185
|
-
timeout: isLinux2 ? 3e3 : 1e4,
|
|
1186
|
-
// Shorter timeout for Linux
|
|
1187
|
-
env: {
|
|
1188
|
-
PATH: minimalPath,
|
|
1189
|
-
SHELL: shell,
|
|
1190
|
-
USER: os__namespace.userInfo().username,
|
|
1191
|
-
HOME: homeDir,
|
|
1192
|
-
// Add ZDOTDIR for zsh users who might have custom config location
|
|
1193
|
-
ZDOTDIR: process.env.ZDOTDIR || homeDir
|
|
1194
|
-
}
|
|
1195
|
-
}).trim();
|
|
1196
|
-
logger.debug("Successfully loaded user PATH from shell config files", {
|
|
1197
|
-
fullCommand,
|
|
1198
|
-
pathLength: shellPath.split(":").length
|
|
1199
|
-
});
|
|
1200
|
-
} catch (error) {
|
|
1201
|
-
logger.error("Failed to load PATH from shell config:", error);
|
|
1202
|
-
try {
|
|
1203
|
-
shellPath = child_process.execSync(shellCommand, {
|
|
1187
|
+
shellPath = extractPathFromOutput(
|
|
1188
|
+
child_process.execSync(fullCommand, {
|
|
1204
1189
|
encoding: "utf8",
|
|
1205
1190
|
timeout: isLinux2 ? 3e3 : 1e4,
|
|
1206
1191
|
// Shorter timeout for Linux
|
|
@@ -1208,9 +1193,32 @@ const getShellPath = () => {
|
|
|
1208
1193
|
PATH: minimalPath,
|
|
1209
1194
|
SHELL: shell,
|
|
1210
1195
|
USER: os__namespace.userInfo().username,
|
|
1211
|
-
HOME:
|
|
1196
|
+
HOME: homeDir,
|
|
1197
|
+
// Add ZDOTDIR for zsh users who might have custom config location
|
|
1198
|
+
ZDOTDIR: process.env.ZDOTDIR || homeDir
|
|
1212
1199
|
}
|
|
1213
|
-
})
|
|
1200
|
+
})
|
|
1201
|
+
);
|
|
1202
|
+
logger.debug("Successfully loaded user PATH from shell config files", {
|
|
1203
|
+
fullCommand,
|
|
1204
|
+
pathLength: shellPath.split(":").length
|
|
1205
|
+
});
|
|
1206
|
+
} catch (error) {
|
|
1207
|
+
logger.error("Failed to load PATH from shell config:", error);
|
|
1208
|
+
try {
|
|
1209
|
+
shellPath = extractPathFromOutput(
|
|
1210
|
+
child_process.execSync(shellCommand, {
|
|
1211
|
+
encoding: "utf8",
|
|
1212
|
+
timeout: isLinux2 ? 3e3 : 1e4,
|
|
1213
|
+
// Shorter timeout for Linux
|
|
1214
|
+
env: {
|
|
1215
|
+
PATH: minimalPath,
|
|
1216
|
+
SHELL: shell,
|
|
1217
|
+
USER: os__namespace.userInfo().username,
|
|
1218
|
+
HOME: os__namespace.homedir()
|
|
1219
|
+
}
|
|
1220
|
+
})
|
|
1221
|
+
);
|
|
1214
1222
|
logger.debug("Loaded PATH using login shell flags");
|
|
1215
1223
|
} catch (loginError) {
|
|
1216
1224
|
logger.error("Failed to load PATH from login shell:", loginError);
|
|
@@ -1219,22 +1227,26 @@ const getShellPath = () => {
|
|
|
1219
1227
|
}
|
|
1220
1228
|
} else {
|
|
1221
1229
|
try {
|
|
1222
|
-
shellPath =
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1230
|
+
shellPath = extractPathFromOutput(
|
|
1231
|
+
child_process.execSync(`${shell} -c 'echo $PATH'`, {
|
|
1232
|
+
encoding: "utf8",
|
|
1233
|
+
timeout: 2e3,
|
|
1234
|
+
env: process.env
|
|
1235
|
+
})
|
|
1236
|
+
);
|
|
1227
1237
|
logger.debug("Quick PATH retrieval succeeded");
|
|
1228
1238
|
} catch (quickError) {
|
|
1229
1239
|
logger.debug("Quick PATH retrieval failed, falling back to login shell approach", {
|
|
1230
1240
|
error: quickError instanceof Error ? quickError.message : quickError
|
|
1231
1241
|
});
|
|
1232
|
-
shellPath =
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1242
|
+
shellPath = extractPathFromOutput(
|
|
1243
|
+
child_process.execSync(shellCommand, {
|
|
1244
|
+
encoding: "utf8",
|
|
1245
|
+
timeout: isLinux2 ? 3e3 : 1e4,
|
|
1246
|
+
// Shorter timeout for Linux
|
|
1247
|
+
env: process.env
|
|
1248
|
+
})
|
|
1249
|
+
);
|
|
1238
1250
|
logger.debug("Login shell PATH retrieval succeeded");
|
|
1239
1251
|
}
|
|
1240
1252
|
}
|
|
@@ -8018,6 +8030,7 @@ ${fileList}${readOnlyNote}`
|
|
|
8018
8030
|
if (!abortSignal?.aborted) {
|
|
8019
8031
|
task.addLogMessage("loading", void 0, false, promptContext);
|
|
8020
8032
|
}
|
|
8033
|
+
const lastToolMessage = response.messages.findLast((m) => m.role === "tool");
|
|
8021
8034
|
response.messages.forEach((message) => {
|
|
8022
8035
|
if (message.role === "assistant") {
|
|
8023
8036
|
messages.push({
|
|
@@ -8033,6 +8046,7 @@ ${fileList}${readOnlyNote}`
|
|
|
8033
8046
|
// @ts-expect-error the id is there
|
|
8034
8047
|
id: message.id || uuid.v4(),
|
|
8035
8048
|
promptContext,
|
|
8049
|
+
usageReport: !hasAssistantMessage && message === lastToolMessage ? usageReport : void 0,
|
|
8036
8050
|
timestamp: Date.now()
|
|
8037
8051
|
});
|
|
8038
8052
|
}
|
|
@@ -8062,8 +8076,8 @@ ${fileList}${readOnlyNote}`
|
|
|
8062
8076
|
taskTokensOverride,
|
|
8063
8077
|
contextCompactionType
|
|
8064
8078
|
});
|
|
8065
|
-
const
|
|
8066
|
-
const usageReport =
|
|
8079
|
+
const lastUsageReportMessage = [...resultMessages].reverse().find((m) => (m.role === "assistant" || m.role === "tool") && m.usageReport);
|
|
8080
|
+
const usageReport = lastUsageReportMessage?.usageReport;
|
|
8067
8081
|
const maxTokens = this.modelManager.getModelSettings(provider.id, model)?.maxInputTokens;
|
|
8068
8082
|
if (!usageReport || !maxTokens) {
|
|
8069
8083
|
logger.debug("No usageReport or maxTokens", {
|
|
@@ -9014,16 +9028,20 @@ const RunPromptSchema = zod.z.object({
|
|
|
9014
9028
|
mode: zod.z.string().optional(),
|
|
9015
9029
|
images: zod.z.array(zod.z.string()).optional(),
|
|
9016
9030
|
model: zod.z.string().optional(),
|
|
9017
|
-
agentProfileId: zod.z.string().optional()
|
|
9031
|
+
agentProfileId: zod.z.string().optional(),
|
|
9032
|
+
autonomyMode: zod.z.nativeEnum(AutonomyMode).optional()
|
|
9018
9033
|
});
|
|
9019
|
-
const
|
|
9020
|
-
if (!model && !agentProfileId) {
|
|
9034
|
+
const parseTaskParams = (model, agentProfileId, autonomyMode) => {
|
|
9035
|
+
if (!model && !agentProfileId && !autonomyMode) {
|
|
9021
9036
|
return void 0;
|
|
9022
9037
|
}
|
|
9023
9038
|
const params = {};
|
|
9024
9039
|
if (agentProfileId) {
|
|
9025
9040
|
params.agentProfileId = agentProfileId;
|
|
9026
9041
|
}
|
|
9042
|
+
if (autonomyMode) {
|
|
9043
|
+
params.autonomyMode = autonomyMode;
|
|
9044
|
+
}
|
|
9027
9045
|
if (model) {
|
|
9028
9046
|
const slashIndex = model.indexOf("/");
|
|
9029
9047
|
if (slashIndex > 0) {
|
|
@@ -9069,12 +9087,12 @@ class PromptApi extends BaseApi {
|
|
|
9069
9087
|
res.status(400).json({ error: parsed.error.flatten() });
|
|
9070
9088
|
return;
|
|
9071
9089
|
}
|
|
9072
|
-
const { projectDir, taskId, prompt, mode, images, model, agentProfileId } = parsed.data;
|
|
9090
|
+
const { projectDir, taskId, prompt, mode, images, model, agentProfileId, autonomyMode } = parsed.data;
|
|
9073
9091
|
const isSSE = acceptsSSE && !acceptsJSON;
|
|
9074
9092
|
if (isSSE) {
|
|
9075
|
-
void this.handleRunPromptSSE(res, projectDir, prompt, taskId, mode, images, model, agentProfileId);
|
|
9093
|
+
void this.handleRunPromptSSE(res, projectDir, prompt, taskId, mode, images, model, agentProfileId, autonomyMode);
|
|
9076
9094
|
} else {
|
|
9077
|
-
void this.handleRunPromptJSON(res, projectDir, prompt, taskId, mode, images, model, agentProfileId);
|
|
9095
|
+
void this.handleRunPromptJSON(res, projectDir, prompt, taskId, mode, images, model, agentProfileId, autonomyMode);
|
|
9078
9096
|
}
|
|
9079
9097
|
});
|
|
9080
9098
|
router.post(
|
|
@@ -9090,22 +9108,22 @@ class PromptApi extends BaseApi {
|
|
|
9090
9108
|
})
|
|
9091
9109
|
);
|
|
9092
9110
|
}
|
|
9093
|
-
async handleRunPromptJSON(res, projectDir, prompt, taskId, mode, images, model, agentProfileId) {
|
|
9111
|
+
async handleRunPromptJSON(res, projectDir, prompt, taskId, mode, images, model, agentProfileId, autonomyMode) {
|
|
9094
9112
|
if (taskId) {
|
|
9095
9113
|
const responses = await this.eventsHandler.runPrompt(projectDir, taskId, prompt, mode, images);
|
|
9096
9114
|
res.status(200).json(responses);
|
|
9097
9115
|
} else {
|
|
9098
|
-
const taskParams =
|
|
9116
|
+
const taskParams = parseTaskParams(model, agentProfileId, autonomyMode);
|
|
9099
9117
|
const result = await this.eventsHandler.ensureProjectAndCreateTask(projectDir, taskParams);
|
|
9100
9118
|
const responses = await this.eventsHandler.runPrompt(result.projectDir, result.taskId, prompt, mode, images);
|
|
9101
9119
|
res.setHeader("X-Task-Id", result.taskId);
|
|
9102
9120
|
res.status(200).json(responses);
|
|
9103
9121
|
}
|
|
9104
9122
|
}
|
|
9105
|
-
async handleRunPromptSSE(res, projectDir, prompt, taskId, mode, images, model, agentProfileId) {
|
|
9123
|
+
async handleRunPromptSSE(res, projectDir, prompt, taskId, mode, images, model, agentProfileId, autonomyMode) {
|
|
9106
9124
|
let resolvedTaskId = taskId;
|
|
9107
9125
|
if (!resolvedTaskId) {
|
|
9108
|
-
const taskParams =
|
|
9126
|
+
const taskParams = parseTaskParams(model, agentProfileId, autonomyMode);
|
|
9109
9127
|
const result = await this.eventsHandler.ensureProjectAndCreateTask(projectDir, taskParams);
|
|
9110
9128
|
resolvedTaskId = result.taskId;
|
|
9111
9129
|
}
|
|
@@ -14608,7 +14626,7 @@ class WorktreeManager {
|
|
|
14608
14626
|
};
|
|
14609
14627
|
}
|
|
14610
14628
|
}
|
|
14611
|
-
async rebaseMainIntoWorktree(worktreePath, mainBranch, baseCommit) {
|
|
14629
|
+
async rebaseMainIntoWorktree(worktreePath, mainBranch, baseCommit, symlinkFolders = []) {
|
|
14612
14630
|
return await withLock(`git-rebase-${worktreePath}`, async () => {
|
|
14613
14631
|
const executedCommands = [];
|
|
14614
14632
|
let lastOutput = "";
|
|
@@ -14620,6 +14638,16 @@ class WorktreeManager {
|
|
|
14620
14638
|
const addCommand = "git add -A";
|
|
14621
14639
|
executedCommands.push(`${addCommand} (in ${worktreePath})`);
|
|
14622
14640
|
await execWithShellPath(addCommand, { cwd: worktreePath });
|
|
14641
|
+
if (symlinkFolders.length > 0) {
|
|
14642
|
+
const resetPaths = symlinkFolders.map((f) => `"${f}"`).join(" ");
|
|
14643
|
+
const resetCommand = `git reset HEAD -- ${resetPaths}`;
|
|
14644
|
+
executedCommands.push(`${resetCommand} (in ${worktreePath})`);
|
|
14645
|
+
try {
|
|
14646
|
+
await execWithShellPath(resetCommand, { cwd: worktreePath });
|
|
14647
|
+
} catch {
|
|
14648
|
+
logger.debug("Some symlink folders could not be unstaged (may not be in index)");
|
|
14649
|
+
}
|
|
14650
|
+
}
|
|
14623
14651
|
const commitCommand = `git commit --no-verify -m "TEMP_UNCOMMITTED_${Date.now()}"`;
|
|
14624
14652
|
executedCommands.push(`${commitCommand} (in ${worktreePath})`);
|
|
14625
14653
|
await execWithShellPath(commitCommand, {
|
|
@@ -15374,6 +15402,9 @@ Git output: ${err.stderr || err.stdout || err.message}`
|
|
|
15374
15402
|
if (!stats) {
|
|
15375
15403
|
continue;
|
|
15376
15404
|
}
|
|
15405
|
+
if (this.isSymlinkPath(worktreePath, filePath)) {
|
|
15406
|
+
continue;
|
|
15407
|
+
}
|
|
15377
15408
|
const absoluteFilePath = path.join(worktreePath, filePath);
|
|
15378
15409
|
let finalDiff = diff;
|
|
15379
15410
|
try {
|
|
@@ -15420,6 +15451,9 @@ Git output: ${err.stderr || err.stdout || err.message}`
|
|
|
15420
15451
|
if (!filePath) {
|
|
15421
15452
|
continue;
|
|
15422
15453
|
}
|
|
15454
|
+
if (this.isSymlinkPath(worktreePath, filePath)) {
|
|
15455
|
+
continue;
|
|
15456
|
+
}
|
|
15423
15457
|
const absoluteFilePath = path.join(worktreePath, filePath);
|
|
15424
15458
|
let diff = "";
|
|
15425
15459
|
try {
|
|
@@ -15470,6 +15504,9 @@ Git output: ${err.stderr || err.stdout || err.message}`
|
|
|
15470
15504
|
if (!filePath) {
|
|
15471
15505
|
continue;
|
|
15472
15506
|
}
|
|
15507
|
+
if (this.isSymlinkPath(worktreePath, filePath)) {
|
|
15508
|
+
continue;
|
|
15509
|
+
}
|
|
15473
15510
|
const absoluteFilePath = path.join(worktreePath, filePath);
|
|
15474
15511
|
let diff = "";
|
|
15475
15512
|
try {
|
|
@@ -15521,6 +15558,9 @@ Git output: ${err.stderr || err.stdout || err.message}`
|
|
|
15521
15558
|
if (!filePath) {
|
|
15522
15559
|
continue;
|
|
15523
15560
|
}
|
|
15561
|
+
if (this.isSymlinkPath(worktreePath, filePath)) {
|
|
15562
|
+
continue;
|
|
15563
|
+
}
|
|
15524
15564
|
const absoluteFilePath = path.join(worktreePath, filePath);
|
|
15525
15565
|
let diff = "";
|
|
15526
15566
|
try {
|
|
@@ -20082,7 +20122,14 @@ ${diff}
|
|
|
20082
20122
|
await this.waitForCurrentPromptToFinish();
|
|
20083
20123
|
try {
|
|
20084
20124
|
this.addLogMessage("loading", `Rebasing worktree from ${effectiveFromBranch}...`);
|
|
20085
|
-
const
|
|
20125
|
+
const settings = this.store.getSettings();
|
|
20126
|
+
const symlinkFolders = settings.taskSettings.worktreeSymlinkFolders || [];
|
|
20127
|
+
const { success, error } = await this.worktreeManager.rebaseMainIntoWorktree(
|
|
20128
|
+
this.task.worktree.path,
|
|
20129
|
+
effectiveFromBranch,
|
|
20130
|
+
this.task.worktree.baseCommit,
|
|
20131
|
+
symlinkFolders
|
|
20132
|
+
);
|
|
20086
20133
|
if (success) {
|
|
20087
20134
|
const newHead = await this.worktreeManager.getHeadCommit(this.task.worktree.path);
|
|
20088
20135
|
if (newHead) {
|
|
@@ -21670,6 +21717,9 @@ const anthropicProviderStrategy = {
|
|
|
21670
21717
|
// Configuration helpers
|
|
21671
21718
|
getCacheControl: getAnthropicCacheControl
|
|
21672
21719
|
};
|
|
21720
|
+
const ensureV1Suffix = (baseUrl) => {
|
|
21721
|
+
return baseUrl.endsWith("/v1") ? baseUrl : `${baseUrl}/v1`;
|
|
21722
|
+
};
|
|
21673
21723
|
const loadAnthropicCompatibleModels = async (profile, settings) => {
|
|
21674
21724
|
if (!isAnthropicCompatibleProvider(profile.provider)) {
|
|
21675
21725
|
return { models: [], success: false };
|
|
@@ -21685,7 +21735,7 @@ const loadAnthropicCompatibleModels = async (profile, settings) => {
|
|
|
21685
21735
|
return { models: [], success: false };
|
|
21686
21736
|
}
|
|
21687
21737
|
try {
|
|
21688
|
-
const response = await fetch(`${effectiveBaseUrl}/
|
|
21738
|
+
const response = await fetch(`${ensureV1Suffix(effectiveBaseUrl)}/models`, {
|
|
21689
21739
|
headers: {
|
|
21690
21740
|
"x-api-key": effectiveApiKey,
|
|
21691
21741
|
"anthropic-version": "2023-06-01"
|
|
@@ -21770,7 +21820,7 @@ const createAnthropicCompatibleLlm = (profile, model, settings, projectDir) => {
|
|
|
21770
21820
|
}
|
|
21771
21821
|
const anthropicProvider = anthropic.createAnthropic({
|
|
21772
21822
|
apiKey,
|
|
21773
|
-
baseURL: baseUrl,
|
|
21823
|
+
baseURL: ensureV1Suffix(baseUrl),
|
|
21774
21824
|
headers: profile.headers
|
|
21775
21825
|
});
|
|
21776
21826
|
return anthropicProvider(model.id);
|
|
@@ -24052,15 +24102,22 @@ const getOpenAiCompatibleProviderOptions = (provider, model) => {
|
|
|
24052
24102
|
const openAiCompatibleProvider = provider;
|
|
24053
24103
|
const providerOverrides = model.providerOverrides;
|
|
24054
24104
|
const reasoningEffort = providerOverrides?.reasoningEffort ?? openAiCompatibleProvider.reasoningEffort;
|
|
24105
|
+
const extraBody = providerOverrides?.extraBody ?? openAiCompatibleProvider.extraBody;
|
|
24055
24106
|
const mappedReasoningEffort = reasoningEffort === void 0 || reasoningEffort === ReasoningEffort.None ? void 0 : reasoningEffort.toLowerCase();
|
|
24107
|
+
const providerOptions = {};
|
|
24056
24108
|
if (mappedReasoningEffort) {
|
|
24057
|
-
|
|
24058
|
-
|
|
24109
|
+
providerOptions.reasoningEffort = mappedReasoningEffort;
|
|
24110
|
+
}
|
|
24111
|
+
if (extraBody) {
|
|
24112
|
+
Object.assign(providerOptions, extraBody);
|
|
24113
|
+
}
|
|
24114
|
+
if (Object.keys(providerOptions).length > 0) {
|
|
24115
|
+
logger.debug("Using provider options for OpenAI Compatible:", {
|
|
24116
|
+
mappedReasoningEffort,
|
|
24117
|
+
hasExtraBody: !!extraBody
|
|
24059
24118
|
});
|
|
24060
24119
|
return {
|
|
24061
|
-
[provider.name]:
|
|
24062
|
-
reasoningEffort: mappedReasoningEffort
|
|
24063
|
-
}
|
|
24120
|
+
[provider.name]: providerOptions
|
|
24064
24121
|
};
|
|
24065
24122
|
}
|
|
24066
24123
|
return void 0;
|
|
@@ -31583,7 +31640,7 @@ const DEFAULT_SETTINGS = {
|
|
|
31583
31640
|
theme: "dark",
|
|
31584
31641
|
font: "Sono",
|
|
31585
31642
|
renderMarkdown: true,
|
|
31586
|
-
|
|
31643
|
+
fullMessageRendering: false,
|
|
31587
31644
|
aiderDeskAutoUpdate: true,
|
|
31588
31645
|
messageViewMode: MessageViewMode.Compact,
|
|
31589
31646
|
diffViewMode: DiffViewMode.SideBySide,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiderdesk/aiderdesk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.73.0",
|
|
4
4
|
"description": "AiderDesk - AI-Powered Development Platform",
|
|
5
5
|
"bin": {
|
|
6
6
|
"aiderdesk": "./bin/aiderdesk.js"
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"license": "MIT",
|
|
38
38
|
"dependencies": {
|
|
39
|
+
"@agentclientprotocol/sdk": "1.1.0",
|
|
39
40
|
"@ai-sdk/alibaba": "0.0.13",
|
|
40
41
|
"@ai-sdk/amazon-bedrock": "3.0.103",
|
|
41
42
|
"@ai-sdk/anthropic": "2.0.83",
|
|
@@ -48,7 +49,7 @@
|
|
|
48
49
|
"@ai-sdk/mistral": "2.0.35",
|
|
49
50
|
"@ai-sdk/openai": "2.0.108",
|
|
50
51
|
"@ai-sdk/openai-compatible": "1.0.41",
|
|
51
|
-
"@aiderdesk/extensions": "0.
|
|
52
|
+
"@aiderdesk/extensions": "0.24.0",
|
|
52
53
|
"@aws-sdk/client-bedrock": "^3.1059.0",
|
|
53
54
|
"@aws-sdk/credential-providers": "^3.1059.0",
|
|
54
55
|
"@dotenvx/dotenvx": "^1.24.5",
|
|
@@ -36,6 +36,7 @@ const NODE_BUILTINS = new Set([
|
|
|
36
36
|
// Packages that are already in the committed package.json CLI deps
|
|
37
37
|
const CLI_PACKAGES = new Set([
|
|
38
38
|
'@earendil-works/pi-tui',
|
|
39
|
+
'@agentclientprotocol/sdk',
|
|
39
40
|
]);
|
|
40
41
|
|
|
41
42
|
const runnerJs = readFileSync(resolve(PKG_DIR, 'out', 'runner.js'), 'utf8');
|