Skip to content

Commit e83e885

Browse files
committed
Update
1 parent ede7135 commit e83e885

File tree

3 files changed

+12
-18
lines changed

3 files changed

+12
-18
lines changed

ExtensionService/AppDelegate.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSWindowDelegate {
3030

3131
func applicationDidFinishLaunching(_: Notification) {
3232
if ProcessInfo.processInfo.environment["IS_UNIT_TEST"] == "YES" { return }
33-
// _ = GraphicalUserInterfaceController.shared
34-
// _ = RealtimeSuggestionController.shared
35-
// _ = XcodeInspector.shared
36-
// AXIsProcessTrustedWithOptions([
37-
// kAXTrustedCheckOptionPrompt.takeRetainedValue() as NSString: true,
38-
// ] as CFDictionary)
39-
// setupQuitOnUpdate()
40-
// setupQuitOnUserTerminated()
33+
_ = GraphicalUserInterfaceController.shared
34+
_ = RealtimeSuggestionController.shared
35+
_ = XcodeInspector.shared
36+
AXIsProcessTrustedWithOptions([
37+
kAXTrustedCheckOptionPrompt.takeRetainedValue() as NSString: true,
38+
] as CFDictionary)
39+
setupQuitOnUpdate()
40+
setupQuitOnUserTerminated()
4141
xpcListener = setupXPCListener()
4242
Logger.service.info("XPC Service started.")
4343
NSApp.setActivationPolicy(.accessory)

ExtensionService/InitializePython.swift

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,16 @@ import Foundation
22
import Python
33
import PythonKit
44

5-
@available( *, deprecated, message: "Testing" )
65
func initializePython() {
76
guard let sitePackagePath = Bundle.main.path(forResource: "site-packages", ofType: nil),
87
let stdLibPath = Bundle.main.path(forResource: "python-stdlib", ofType: nil),
98
let libDynloadPath = Bundle.main.path(
109
forResource: "python-stdlib/lib-dynload",
1110
ofType: nil
12-
) else { return }
11+
)
12+
else { return }
1313
setenv("PYTHONHOME", stdLibPath, 1)
1414
setenv("PYTHONPATH", "\(stdLibPath):\(libDynloadPath):\(sitePackagePath)", 1)
1515
Py_Initialize()
16-
17-
let sys = Python.import("sys")
18-
print("Python Version: \(sys.version_info.major).\(sys.version_info.minor)")
19-
print("Python Encoding: \(sys.getdefaultencoding().upper())")
20-
print("Python Path: \(sys.path)")
21-
22-
let llms = Python.import("langchain.llms")
23-
print(llms.OpenAI)
2416
}
2517

site-packages/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
openai
22
langchain
3+
readability-lxml
4+
tiktoken

0 commit comments

Comments
 (0)