chore: and more cleanups
This commit is contained in:
@@ -19,6 +19,16 @@ entity AiEndpoint {
|
||||
-- airplane: local model (Ollama, LM Studio, etc.)
|
||||
}
|
||||
|
||||
surface AiEndpointSurface {
|
||||
context endpoint: AiEndpoint
|
||||
|
||||
exposes:
|
||||
endpoint.kind
|
||||
endpoint.url
|
||||
endpoint.api_key when endpoint.api_key != null
|
||||
endpoint.model
|
||||
}
|
||||
|
||||
entity SecureKeyStore {
|
||||
-- Encrypts API keys using OS keychain
|
||||
-- macOS: Keychain, Windows: DPAPI, Linux: libsecret
|
||||
@@ -26,6 +36,10 @@ entity SecureKeyStore {
|
||||
-- No plain-text fallback
|
||||
}
|
||||
|
||||
surface SecureKeyStoreSurface {
|
||||
context _: SecureKeyStore
|
||||
}
|
||||
|
||||
entity ChatConversation {
|
||||
title: String
|
||||
model: String
|
||||
@@ -35,6 +49,17 @@ entity ChatConversation {
|
||||
messages: ChatMessage with conversation = this
|
||||
}
|
||||
|
||||
surface ChatConversationSurface {
|
||||
context conversation: ChatConversation
|
||||
|
||||
exposes:
|
||||
conversation.title
|
||||
conversation.model
|
||||
conversation.created_at
|
||||
conversation.updated_at
|
||||
conversation.messages.count
|
||||
}
|
||||
|
||||
entity ChatMessage {
|
||||
conversation: ChatConversation
|
||||
role: system | user | assistant | tool
|
||||
@@ -44,6 +69,18 @@ entity ChatMessage {
|
||||
created_at: Timestamp
|
||||
}
|
||||
|
||||
surface ChatMessageSurface {
|
||||
context message: ChatMessage
|
||||
|
||||
exposes:
|
||||
message.conversation
|
||||
message.role
|
||||
message.content
|
||||
message.token_usage_input when message.token_usage_input != null
|
||||
message.token_usage_output when message.token_usage_output != null
|
||||
message.created_at
|
||||
}
|
||||
|
||||
surface OneShotAiSurface {
|
||||
facing _: AiOperator
|
||||
|
||||
|
||||
Reference in New Issue
Block a user