Skip to content

Commit 70ade54

Browse files
Context lenght and max turns bug fixes
1 parent 8dc35ee commit 70ade54

31 files changed

Lines changed: 3787 additions & 70 deletions

.omnicode/usage.json

Lines changed: 1783 additions & 3 deletions
Large diffs are not rendered by default.

PERMISSIONS.md

Lines changed: 483 additions & 0 deletions
Large diffs are not rendered by default.

build/app.manifest

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
3+
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
4+
<application>
5+
<!-- Windows 10 and Windows 11 -->
6+
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
7+
<!-- Windows 8.1 -->
8+
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
9+
</application>
10+
</compatibility>
11+
<application xmlns="urn:schemas-microsoft-com:asm.v3">
12+
<windowsSettings>
13+
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
14+
</windowsSettings>
15+
</application>
16+
</assembly>

build/entitlements.mac.plist

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<!-- Allow execution of JIT-compiled code (for Node.js/Electron) -->
6+
<key>com.apple.security.cs.allow-jit</key>
7+
<true/>
8+
9+
<!-- Allow execution of unsigned binaries (needed for node-pty spawn-helper) -->
10+
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
11+
<true/>
12+
13+
<!-- Allow dyld environment variables (for shell execution) -->
14+
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
15+
<true/>
16+
17+
<!-- Disable library validation (needed for node-pty) -->
18+
<key>com.apple.security.cs.disable-library-validation</key>
19+
<true/>
20+
21+
<!-- Allow debugging (optional, for development) -->
22+
<key>com.apple.security.get-task-allow</key>
23+
<true/>
24+
25+
<!-- File access permissions -->
26+
<key>com.apple.security.files.user-selected.read-write</key>
27+
<true/>
28+
</dict>
29+
</plist>

build/omni-code.desktop

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[Desktop Entry]
2+
Name=Omni Code
3+
Comment=AI-powered code assistant
4+
Exec=/opt/OmniCode/omni-code %U
5+
Icon=/opt/OmniCode/icon.png
6+
Type=Application
7+
Categories=Development;IDE;
8+
Terminal=false
9+
MimeType=text/plain;
10+
Actions=NewWindow;
11+
12+
[Desktop Action NewWindow]
13+
Name=Open New Window
14+
Exec=/opt/OmniCode/omni-code --new-window

build/polkit/com.omnicode.policy

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
3+
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
4+
<policyconfig>
5+
<vendor>Omni Code</vendor>
6+
<vendor_url>https://omnicode.dev</vendor_url>
7+
8+
<action id="com.omnicode.execute">
9+
<description>Execute shell commands via Omni Code</description>
10+
<message>Authentication is required to execute system commands</message>
11+
<defaults>
12+
<allow_any>yes</allow_any>
13+
<allow_inactive>yes</allow_inactive>
14+
<allow_active>yes</allow_active>
15+
</defaults>
16+
</action>
17+
</policyconfig>

electron-builder.yml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
appId: com.omnicode.app
22
productName: Omni Code
3-
copyright: Copyright © 2025
3+
copyright: Copyright 2025
44
directories:
55
output: dist-electron
66
buildResources: build
@@ -16,6 +16,7 @@ extraResources:
1616
filter:
1717
- "**/*.js"
1818
- "**/*.js.map"
19+
1920
mac:
2021
category: public.app-category.developer-tools
2122
target:
@@ -24,6 +25,14 @@ mac:
2425
- target: zip
2526
arch: [x64, arm64]
2627
icon: build/icon.icns
28+
# Enable hardened runtime with entitlements for shell execution
29+
hardenedRuntime: true
30+
gatekeeperAssess: false
31+
entitlements: build/entitlements.mac.plist
32+
entitlementsInherit: build/entitlements.mac.plist
33+
# Notarization (requires Apple Developer account)
34+
# Sign with: export CSC_NAME="Developer ID Application: Your Name"
35+
2736
dmg:
2837
contents:
2938
- x: 130
@@ -32,6 +41,7 @@ dmg:
3241
y: 220
3342
type: link
3443
path: /Applications
44+
3545
win:
3646
target:
3747
- target: nsis
@@ -40,19 +50,42 @@ win:
4050
arch: [x64]
4151
icon: build/icon.ico
4252
requestedExecutionLevel: asInvoker
53+
# Use application manifest for Windows compatibility
54+
# manifest: build/app.manifest
55+
# Code signing (optional but recommended to avoid SmartScreen)
56+
# certificateFile: "path/to/certificate.p12"
57+
# certificatePassword: "password" # Or use env var: WIN_CSC_KEY_PASSWORD
58+
4359
nsis:
4460
oneClick: false
4561
allowToChangeInstallationDirectory: true
4662
createDesktopShortcut: true
4763
createStartMenuShortcut: true
64+
# Request admin rights for installation (optional)
65+
# perMachine: true
66+
4867
linux:
4968
target:
5069
- target: AppImage
5170
arch: [x64, arm64]
5271
- target: deb
5372
arch: [x64, arm64]
73+
- target: rpm
74+
arch: [x64, arm64]
5475
icon: build/icon.png
5576
category: Development
77+
# Desktop entry for proper app integration
78+
desktop:
79+
Name: Omni Code
80+
Comment: AI-powered code assistant
81+
Categories: Development;IDE;
82+
# For deb packages
83+
maintainer: Omni Code Team
84+
vendor: Omni Code
85+
# For rpm packages
86+
synopsis: AI-powered code assistant
87+
description: Omni Code is an AI-powered code assistant with remote access capabilities
88+
5689
publish:
5790
provider: github
5891
owner: GraysonBannister

main/core-integration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ export async function initializeCore(): Promise<void> {
641641
tools: toolRegistry.getAll(),
642642
temperature: config.get('temperature'),
643643
maxContextTokens: config.get('maxContextTokens'),
644-
maxTurns: settingsManager.get('ai.maxTurns') ?? undefined,
644+
maxTurns: settingsManager.get('ai.maxTurns') ?? null,
645645
contextCompressionThreshold: config.get('contextCompressionThreshold'),
646646
contextRecentMessagesToKeep: config.get('contextRecentMessagesToKeep'),
647647
planMode: false,

0 commit comments

Comments
 (0)