Merge master into main
This commit is contained in:
@@ -1,8 +1,50 @@
|
||||
<<<<<<< HEAD
|
||||
import SwiftUI
|
||||
|
||||
struct RootView: View {
|
||||
var body: some View {
|
||||
ProjectBrowserView()
|
||||
=======
|
||||
import MusicAssistantCore
|
||||
import SwiftUI
|
||||
|
||||
struct RootView: View {
|
||||
private let appName = "AI Music Studio"
|
||||
private let boundarySummary = ProductBoundarySummary.initial
|
||||
|
||||
var body: some View {
|
||||
NavigationSplitView {
|
||||
List {
|
||||
Label("Projects", systemImage: "music.note.list")
|
||||
Label("Settings", systemImage: "gearshape")
|
||||
}
|
||||
.navigationTitle(appName)
|
||||
} detail: {
|
||||
VStack(alignment: .leading, spacing: 16) {
|
||||
Text("New Song Project")
|
||||
.font(.largeTitle.weight(.semibold))
|
||||
|
||||
Text(boundarySummary.description)
|
||||
.font(.body)
|
||||
.foregroundStyle(.secondary)
|
||||
.frame(maxWidth: 560, alignment: .leading)
|
||||
|
||||
Divider()
|
||||
|
||||
VStack(alignment: .leading, spacing: 8) {
|
||||
Text("Foundation status")
|
||||
.font(.headline)
|
||||
|
||||
Label("Presentation, Domain, Services, Integrations, and Persistence boundaries are separated.", systemImage: "checkmark.circle")
|
||||
Label("External providers are represented by protocols only.", systemImage: "lock.shield")
|
||||
Label("Secrets are expected from local environment configuration.", systemImage: "key")
|
||||
}
|
||||
.labelStyle(.titleAndIcon)
|
||||
}
|
||||
.padding(32)
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)
|
||||
}
|
||||
>>>>>>> origin/master
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ import Foundation
|
||||
|
||||
public struct AppConfiguration: Equatable, Sendable {
|
||||
public let openAIAPIKey: String?
|
||||
<<<<<<< HEAD
|
||||
public let privateApplicationRules: PrivateApplicationRules?
|
||||
|
||||
public init(
|
||||
@@ -10,12 +11,21 @@ public struct AppConfiguration: Equatable, Sendable {
|
||||
) {
|
||||
self.openAIAPIKey = openAIAPIKey
|
||||
self.privateApplicationRules = privateApplicationRules
|
||||
=======
|
||||
|
||||
public init(openAIAPIKey: String?) {
|
||||
self.openAIAPIKey = openAIAPIKey
|
||||
>>>>>>> origin/master
|
||||
}
|
||||
|
||||
public static func development(environment: [String: String] = ProcessInfo.processInfo.environment) -> AppConfiguration {
|
||||
AppConfiguration(
|
||||
<<<<<<< HEAD
|
||||
openAIAPIKey: environment["MUSIC_ASSISTANT_OPENAI_API_KEY"],
|
||||
privateApplicationRules: PrivateApplicationRules(content: environment["MUSIC_ASSISTANT_PRIVATE_AI_RULES"])
|
||||
=======
|
||||
openAIAPIKey: environment["MUSIC_ASSISTANT_OPENAI_API_KEY"]
|
||||
>>>>>>> origin/master
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -343,6 +343,7 @@ public extension SongProject {
|
||||
versions.first { $0.id == versionID }
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
mutating func restoreVersion(id versionID: String, restoredAt: Date = Date()) -> Bool {
|
||||
guard let version = version(id: versionID) else { return false }
|
||||
restoreSnapshot(version.snapshot, updatedAt: restoredAt)
|
||||
@@ -373,6 +374,8 @@ public extension SongProject {
|
||||
self.updatedAt = updatedAt
|
||||
}
|
||||
|
||||
=======
|
||||
>>>>>>> origin/master
|
||||
mutating func appendSection(_ section: SongSection) {
|
||||
var orderedSection = section
|
||||
orderedSection.order = nextSectionOrder
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<<<<<<< HEAD
|
||||
import Foundation
|
||||
|
||||
public protocol AIService: Sendable {
|
||||
@@ -166,5 +167,24 @@ public struct SongProjectUpdateResult: Equatable, Sendable {
|
||||
self.changedScopes = changedScopes
|
||||
self.notes = notes
|
||||
self.followUpQuestions = followUpQuestions
|
||||
=======
|
||||
public protocol AIService: Sendable {
|
||||
func planSongProject(from request: SongPlanningRequest) async throws -> SongPlanningDraft
|
||||
}
|
||||
|
||||
public struct SongPlanningRequest: Equatable, Sendable {
|
||||
public let userIntent: String
|
||||
|
||||
public init(userIntent: String) {
|
||||
self.userIntent = userIntent
|
||||
}
|
||||
}
|
||||
|
||||
public struct SongPlanningDraft: Equatable, Sendable {
|
||||
public let summary: String
|
||||
|
||||
public init(summary: String) {
|
||||
self.summary = summary
|
||||
>>>>>>> origin/master
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user