Skip to content

http-impreza/OmegaBuddy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

OmegaBuddy

Project Overview

OmegaBuddy is a SwiftUI macOS menu bar companion app with two distinct layers:

  • A lightweight companion layer for short, state-aware dialogue.
  • An explicit local-AI assistant layer for bounded user-triggered actions.

The current V3 codebase is centered around a stable menu bar shell, a shared app-level view model, and a local Ollama-backed assistant workflow. The app renders companion dialogue in a compact top shell by default, expands into a larger response shell for summarize/improve output, and uses a separate expanded panel shell for Ask Omega and Settings.

Screenshots

OmegaBuddy on desktop

OmegaBuddy on desktop

Tech Stack

  • Swift
  • SwiftUI
  • AppKit
  • Ollama local HTTP API
  • Local model default: gemma4:e2b

Requirements

  • macOS with support for SwiftUI menu bar apps
  • Xcode for building and running the project
  • Ollama installed and running locally
  • A local Ollama model available at the configured endpoint

Local Ollama Setup

OmegaBuddy expects a local Ollama server at:

http://127.0.0.1:11434/api/generate

The current default model is defined in app settings as:

gemma4:e2b

The model name is configurable from the in-app Settings panel. By default, the app uses the value defined in AppSettings.defaultModelName.

Running the App

  1. Start Ollama locally and ensure the configured model is available.
  2. Open the project in Xcode.
  3. Build and run the OmegaBuddy app target.
  4. Launch the app and access it from the macOS menu bar.

Project Structure

OmegaBuddy/
├── README.md
├── OmegaBuddy/
│   ├── App/
│   │   └── OmegaBuddyApp.swift
│   ├── Core/
│   │   ├── BuddyBrain.swift
│   │   └── CharacterController.swift
│   ├── Services/
│   │   ├── DialogueService.swift
│   │   ├── LocalAsker.swift
│   │   ├── LocalImprover.swift
│   │   ├── LocalOllamaClient.swift
│   │   └── LocalSummarizer.swift
│   ├── State/
│   │   ├── AppSettings.swift
│   │   ├── ConversationTurn.swift
│   │   └── OmegaState.swift
│   ├── UI/
│   │   ├── AskOmegaPanel.swift
│   │   ├── ContentView.swift
│   │   ├── OmegaViewModel.swift
│   │   └── SettingsView.swift
│   └── Assets.xcassets
└── Products/
    └── OmegaBuddy.app

Architecture Overview

App Shell

  • OmegaBuddyApp.swift
    • Owns the menu bar window shell.
    • Owns shared OmegaViewModel lifetime.
    • Owns outer width, padding, footer divider, Quit area, and shell height policy.

UI

  • ContentView.swift

    • Main shell view.
    • Renders the top output shell and the optional lower panel section.
    • Coordinates shell presentation mode with active panel state and output presentation mode.
  • AskOmegaPanel.swift

    • Ask Omega workspace panel with prompt input, recent-context indicator, Ask action, and Clear Chat action.
  • SettingsView.swift

    • Settings surface for model/configuration controls and reset actions.

View Model / State

  • OmegaViewModel.swift

    • Central UI coordinator.
    • Manages companion dialogue, assistant actions, output display, presentation policy, clipboard actions, Ask Omega context, and app-session state.
  • OmegaState.swift

    • Lightweight companion interaction state.
  • ConversationTurn.swift

    • Stores bounded Ask Omega prompt/reply context.
  • AppSettings.swift

    • Defines persisted settings keys and default values.

Core Logic

  • BuddyBrain.swift

    • Chooses dialogue categories from companion state.
  • CharacterController.swift

    • Drives portrait animation and speaking state.
  • DialogueService.swift

    • Stores curated dialogue pools and returns random lines.

Local AI Services

  • LocalSummarizer.swift

    • Summarize Clipboard task wrapper.
  • LocalImprover.swift

    • Improve Clipboard task wrapper.
  • LocalAsker.swift

    • Ask Omega task wrapper with bounded recent context.
  • LocalOllamaClient.swift

    • Shared local inference client used by the AI task wrappers.

UI Behavior Model

OmegaBuddy currently uses separate policies for top output presentation and outer shell height.

Compact Companion Mode

Used for:

  • first open
  • New Line
  • normal companion chatter
  • lightweight status-style top output

Behavior:

  • compact top output area
  • compact window height
  • no lower panel unless explicitly opened

Expanded Response Mode

Used for:

  • Summarize Clipboard
  • Improve Clipboard
  • Ask Omega final response rendering

Behavior:

  • expanded top output area
  • larger response shell height
  • scrollable output area
  • no lower panel required

Expanded Panel Mode

Used for:

  • Ask Omega panel open
  • Settings panel open

Behavior:

  • lower panel visible
  • panel shell height
  • top shell remains available while the lower workspace is shown

Current Features

  • Animated menu bar companion portrait
  • Typed dialogue output
  • State-aware companion dialogue categories
  • New Line
  • Summarize Clipboard
  • Improve Clipboard
  • Ask Omega
  • Copy Result
  • Ask Omega recent-context memory
  • Clear Chat
  • In-app Settings panel

Settings

The Settings panel currently exposes:

  • Ask Omega memory depth
  • Model name
  • Typing speed
  • Animation speed
  • Clear Ask Omega context
  • Reset settings to defaults

The current default model in app settings is:

gemma4:e2b

Limitations / Current Scope

  • The app depends on a locally running Ollama instance.
  • Assistant features are intentionally bounded to explicit user-triggered actions.
  • There is no persistence layer for long-term conversation history.
  • Ask Omega context is intentionally lightweight and bounded.
  • Output is shown in a shared top shell rather than in multiple independent surfaces.

About

side project for myself

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages