Skip to content

Commit 957171e

Browse files
authored
Removed the StitchAI scheme (#1219)
1 parent 49cdd8f commit 957171e

File tree

7 files changed

+6
-104
lines changed

7 files changed

+6
-104
lines changed

Stitch.xcodeproj/xcshareddata/xcschemes/StitchAI.xcscheme

Lines changed: 0 additions & 83 deletions
This file was deleted.

Stitch/App/FeatureFlags.swift

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,6 @@ import StitchSchemaKit
1111
// Currently unused but will keep alive here.
1212
struct FeatureFlags {
1313
static let USE_COMMENT_BOX_FLAG: Bool = false
14-
15-
#if STITCH_AI
1614
static let USE_COMPONENTS = false
1715
static let USE_AI_MODE = true
18-
#else
19-
static let USE_COMPONENTS = false
20-
// static let USE_AI_MODE = false
21-
static let USE_AI_MODE = true
22-
#endif
2316
}

Stitch/App/Logging/LogUtils.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ struct FatalErrorIfDebugView: View {
2121
}
2222

2323
func fatalErrorIfDebug(_ message: String = "") {
24-
#if DEBUG || DEV_DEBUG || STITCH_AI
24+
#if DEBUG || DEV_DEBUG
2525
fatalError(message)
2626
#else
2727
log(message)
@@ -39,7 +39,7 @@ func fatalErrorIfDebugOnly(_ message: String = "") {
3939

4040

4141
func assertInDebug(_ conditional: Bool) {
42-
#if DEBUG || DEV_DEBUG || STITCH_AI
42+
#if DEBUG || DEV_DEBUG
4343
assert(conditional)
4444
#endif
4545
}
@@ -54,7 +54,7 @@ enum LoggingAction: Equatable {
5454

5555
// For debug printing from within SwiftUI views
5656
func log(_ message: Any, _ loggingAction: LoggingAction = .none) {
57-
#if DEBUG || DEV_DEBUG || STITCH_AI
57+
#if DEBUG || DEV_DEBUG
5858
print("** \(message)")
5959

6060
switch loggingAction {
@@ -81,7 +81,7 @@ func log(_ message: Any, _ loggingAction: LoggingAction = .none) {
8181
}
8282

8383
func logInView(_ message: String) -> EmptyView {
84-
#if DEBUG || DEV_DEBUG || STITCH_AI
84+
#if DEBUG || DEV_DEBUG
8585
print("** \(message)")
8686
#endif
8787
return EmptyView()

Stitch/Graph/Menu/InsertNodeMenu/Model/InsertNodeMenuState.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,10 @@ struct InsertNodeMenuState: Hashable {
6868
}
6969

7070
var isAIMode: Bool {
71-
// #if STITCH_AI
7271
// We're in AI mode if we have a non-empty query and no matching results
7372
if let query = searchQuery, !query.isEmpty {
7473
return searchResults.isEmpty
7574
}
76-
// #endif
7775
return false
7876
}
7977
}

Stitch/Graph/Toolbar/View/CatalystNavigationBarHelperViews.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ struct CatalystTopBarGraphButtons: View {
175175
}
176176
.opacity(hasActiveGroupFocused ? 1 : 0)
177177

178-
// #if DEBUG || DEV_DEBUG || STITCH_AI
178+
// #if DEBUG || DEV_DEBUG
179179

180180
if llmRecordingModeEnabled {
181181
CatalystNavBarButton(llmRecordingModeActive ? LLM_STOP_RECORDING_SF_SYMBOL : LLM_START_RECORDING_SF_SYMBOL) {

Stitch/Graph/ViewModel/StitchDocumentViewModel.swift

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,17 +149,13 @@ final class StitchDocumentViewModel: Sendable {
149149
self.isDebugMode = isDebugMode
150150

151151
// Handles Stitch AI if enabled
152-
//#if STITCH_AI
153152
do {
154153
self.aiManager = try StitchAIManager()
155154
} catch {
156155
self.aiManager = nil
157156
log("StitchStore error: could not init secrets file with error: \(error)")
158157
}
159-
//#else
160-
// self.aiManager = nil
161-
//#endif
162-
158+
163159
self.lastEncodedDocument = schema
164160

165161
self.initializeDelegate(store: store,

StitchTests/openAIRequestTests.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import StitchSchemaKit
1212
import SwiftyJSON
1313

1414
class OpenAIRequestTests: XCTestCase {
15-
//#if STITCH_AI
1615
func testSecretsNotNil() throws {
1716
do {
1817
let secrets = try Secrets()
@@ -23,7 +22,6 @@ class OpenAIRequestTests: XCTestCase {
2322
XCTFail("testSecretsNotNil failed with error: \(error)\njson: \(contents)")
2423
}
2524
}
26-
//#endif
2725

2826
/// Tests conversions to and from decoded state. StitchAI sometimes uses different types, this ensures types are compatible.
2927
func testStitchAICodables() {

0 commit comments

Comments
 (0)