Package io.github.jbastgen.stemma.app.ai


package io.github.jbastgen.stemma.app.ai
Everything that uses an AI service or prepares text for one: providers, prompts, the Cowork prompt library and export, the proposals for changelogs, merge resolutions and translated messages, and the cache of commit summaries.
  • Class
    Description
    A request that is running (or has run): wait for AiCall.result(), or AiCall.cancel() it.
    Everything the AI connection needs, as one immutable snapshot of the settings.
    A request to an AI service failed.
    The log of everything that goes to an AI service: a file of its own (stemma-ai-YYYY-MM-DD.log in the log folder, see logback.xml), apart from the application log.
    Resolving the conflicts of a file with the AI (feature 6): the prompt with the three versions of every open conflict and a few lines around it, the strict reading of the answer, and the safety checks a proposal must pass.
    What could be done with an answer: the proposals that passed, and the conflicts (by number) that stay open with the reason.
    A proposal for one conflict.
    The kinds of AI service Stemma can talk to.
    The answer of an AI service.
    The one door to AI services.
    Where the API key of an account comes from (the credential store).
    A changelog in the Keep a Changelog style (feature 5): reading the proposal of the AI, merging it into CHANGELOG.md under Unreleased without touching existing entries, and showing what the merge adds.
    What is known about one commit when it is described: its message and the files it changed.
    One changed file: status is "added", "modified" or "deleted"; diff is the unified diff text.
    Reads what a description needs from a repository: message and changes of each commit.
    Describes commits with the AI connection and remembers the answers.
    The description of one or several commits: builds the prompt (from the editable template and the commit data) and reads the answer.
    The description.
    Puts data of the repository into a prompt of the Cowork view.
     
    One commit as it is sent: short id, subject, date and labels; no author.
     
    What is known about the repository.
    A word that a prompt can use to ask for data of the repository, with what it stands for (shown as a tool tip).
    Takes the results of the Cowork view out of the application: as formatted text for the clipboard (HTML for mails and word processors, the Markdown as plain text), and as a PDF.
    A question and the answer to it (Markdown).
    The library of prompts of the Cowork view: the ready-made ones, and the user's own, which are kept in the file prompts/cowork-prompts.tsv of the configuration folder (one prompt per line: category, title and text, separated by tabs; a line break in the text is written as \n).
     
    A title and a category for a prompt.
    A small JSON reader and writer, enough for the requests and answers of AI services: objects become Map<String,Object>, arrays List<Object>, numbers Double, plus String, Boolean and null.
    The text is not valid JSON.
    Translation of commit messages with the AI (feature 7): the prompt, and reading the answer back into one text per commit.
    One message to translate.
    What stands between the repository and an AI service: text that goes out is cleaned of obvious secrets and cut to the configured size, and files that must never be sent can be recognised.
    The outgoing text and what was done to it.
    The texts Stemma puts around what it sends to an AI service.
    Descriptions that were already asked for, one small file each in the configuration folder, so asking again is free.
    Finds a program for the local AI tool.