orynacode-ai 1.16.10 → 1.16.11
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/package.json +1 -1
- package/src/oryna/agent.ts +1 -1
- package/src/provider/provider.ts +8 -3
package/package.json
CHANGED
package/src/oryna/agent.ts
CHANGED
|
@@ -60,7 +60,7 @@ export function start() {
|
|
|
60
60
|
|
|
61
61
|
const host = new URL(url).host
|
|
62
62
|
const user = os.userInfo().username || "user"
|
|
63
|
-
const token = `sk-local-${user}-${path.basename(process.cwd())}`
|
|
63
|
+
const token = `sk-local-${user}-${path.basename(process.env.ORYNA_GATE_WORKSPACE || process.cwd())}`
|
|
64
64
|
const wsUrl = `ws://${host}/ws?token=${token}&name=orynacode`
|
|
65
65
|
|
|
66
66
|
const connect = () => {
|
package/src/provider/provider.ts
CHANGED
|
@@ -1521,9 +1521,9 @@ export const layer = Layer.effect(
|
|
|
1521
1521
|
toPublicInfo(dbInfo),
|
|
1522
1522
|
),
|
|
1523
1523
|
)
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1524
|
+
const opts = options ?? {}
|
|
1525
|
+
const patch: Partial<Info> = providers[providerID] ? { options: opts } : { source: "custom", options: opts }
|
|
1526
|
+
mergeProvider(providerID, patch)
|
|
1527
1527
|
}
|
|
1528
1528
|
|
|
1529
1529
|
for (const [id, fn] of Object.entries(custom(dep))) {
|
|
@@ -1686,6 +1686,11 @@ export const layer = Layer.effect(
|
|
|
1686
1686
|
|
|
1687
1687
|
if (baseURL !== undefined) options["baseURL"] = baseURL
|
|
1688
1688
|
if (options["apiKey"] === undefined && provider.key) options["apiKey"] = provider.key
|
|
1689
|
+
if (model.providerID === "orynagate") {
|
|
1690
|
+
const workspace = path.basename(process.env.ORYNA_GATE_WORKSPACE || process.cwd())
|
|
1691
|
+
const user = os.userInfo().username || "user"
|
|
1692
|
+
options["apiKey"] = `sk-local-${user}-${workspace}`
|
|
1693
|
+
}
|
|
1689
1694
|
if (model.headers)
|
|
1690
1695
|
options["headers"] = {
|
|
1691
1696
|
...options["headers"],
|