Skip to content

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 22 Oct 10:31
· 649 commits to master since this release

Changed

  • Toolbar: follows the focused window. Commit and Rollback are only enabled
    with a pending transaction (and then stand out), never open a session,
    and say when auto-commit is on; Execute becomes Compile in program windows
    and is disabled where nothing runs; disabled buttons say why. New: a
    labelled New SQL button with Open file/Reopen closed, Save, a connection
    selector (switch this window's connection, connect, disconnect), an
    auto-commit toggle and Format.
  • Object views: views and code objects open on their DDL (tables still on
    their columns), and the next object of a type opens on the tab you chose
    last. Only the shown tab loads, on a metadata session of its own, so
    views and edit forms no longer wait behind the object browser,
    completion or compiles. A view's columns skip the primary key lookup,
    and its edit form takes WITH READ ONLY / WITH CHECK OPTION from the
    view's text where the database keeps it there (23ai) instead of
    searching all constraints. RUST_LOG=pythia_db=debug logs how long each
    metadata query took.
  • Completion: the list shows up to 15 suggestions (Settings → Code
    assistance → Visible rows), as many as fit below the line, and opens
    above the line when there is more room there instead of covering it. It
    is as wide as its entries need, up to a limit; long names and details are
    cut with "…" instead of running into each other. A pane next to the list
    shows what hover shows for the selected entry: a column's type,
    nullability and comment, a subprogram's signatures and doc comment, a
    snippet's text.

Added

  • AI assistant (#1). Settings → AI configures several models at once, one
    of them the default, with a Test button: the Anthropic Messages API,
    OpenAI-compatible chat completions, local model servers (Ollama,
    llama.cpp, LM Studio; no key) and command line tools (prompt on stdin,
    answer on stdout). API keys are kept in the OS keychain. A side panel
    (View → AI Assistant) holds the conversation; questions take the focused
    window's connection and statement along. From editors (AI menu, context
    menu, palette): generate SQL from a description with the schema's real
    tables, columns and foreign keys; explain, fix (with the errors) or
    rewrite the statement under the cursor or the selection, then replace it
    or insert the answer's code; analyze the execution plan. "Analyze with
    AI" / "Fix with AI" buttons on plans, run statistics, errors, compile
    errors, top SQL, session details, AWR/ASH reports and traces. Requests
    carry table definitions, keys, indexes, statistics, plans and source;
    result rows and bind values only when allowed in Settings → AI, and each
    answer shows what was sent and what was held back. On the Claude API, a
    request Claude declines is answered by the fallback model Anthropic
    recommends for it.
  • Editors: a context menu. On a database object it offers what the object
    browser offers (query, edit, test, describe, edit table, grants, generate,
    compile, favorites, copy name) and Show in object browser; on a local
    name, go to declaration and find references; plus cut, copy, paste,
    select all, toggle comment and format. On a package member (pkg.proc)
    Edit and Ctrl+click open the package at that subprogram.
  • Invalid objects: the status bar shows how many there are (current schema
    or all user schemas, refreshed on connect, after compiles and DDL and on
    an interval). Clicking it opens a window listing them with their first
    error; it recompiles selected or all objects in dependency order over
    several sessions (Settings → Invalid objects), with progress, cancel and
    what is still invalid afterwards, and marks objects you may not compile.
    SYSDBA connections can use UTL_RECOMP. The browser's recompile button
    uses it too.
  • Navigation in packages: in a program window the body knows the spec's
    declarations and the other way round (go to definition, hover,
    completion, references), Ctrl+click on a call picks the overload its
    arguments fit, a named argument (p_id =>) leads to the callee's
    parameter, labels (exit outer_loop, goto done) are navigable, and
    hover shows the comment above a declaration. New commands (palette,
    Settings → Keyboard, editor menu): Back/Forward (Alt+Left/Right, mouse
    buttons), Switch Spec/Body (Ctrl+Shift+B), Go to Symbol (Ctrl+F12), Peek
    Definition (Alt+F12) and Find References (Shift+F12) as a list to step
    through.
  • Debugger: step through the debugged block itself (it now has debug
    information), and stepping out of the outermost unit continues there; the
    SQL window marks the block's line.
  • Debugger: the call stack names the subprogram (orders_api.load_order:31)
    and the package initialization section.
  • Formatter: profiles (named rule sets to switch between, export and import
    as TOML to share a team style), learning the rules from the focused
    editor or the current schema's stored source (the differences are shown
    with the preview before you apply them), and formatting automatically on
    save and compile, on paste and when a statement's ; is typed (only
    what changes is replaced, as one undo step, and the caret stays put).
    New rules: CASE arms, subqueries, parameter lists and INSERT column and
    VALUES lists each fit on one line or always break, and THEN/LOOP on their
    own line. AI: Format Unsupported Statements hands the statements the
    formatter keeps as written (unsupported constructs, failed safety checks)
    to the AI with the same rules; an answer is applied only if it changes
    nothing but whitespace and case, as one undo step.
  • Database links: the object view has a Details tab (connects as, host,
    created; another schema's private link from DBA_DB_LINKS where you may
    read it) and Test link, also in the context menu, which queries over the
    link and says whether it works.
  • Debugger: selecting a frame in the call stack shows its variables, and
    watches and hover values in its unit come from that frame (its package's
    globals included). Every stop selects the innermost frame again;
    breakpoint conditions are always evaluated where the breakpoint is.
  • Debugger: Settings → Debugger → Compile with debug information makes
    program windows compile with debug information, so Step into enters
    those units without a breakpoint in them. Off by default, as Oracle runs
    such code less optimized. Oracle's notes about the option (PLW-06015,
    PLW-06013) aren't listed with the compile messages. Units that already
    have debug information are no longer recompiled before a debug run.
  • Debugger: when Step into goes over a unit without debug information, the
    panel says so (for the first call in the session, when the unit is
    loaded; later calls can't be told apart from code without calls).

Fixed

  • Object browser: public database links and public synonyms are listed,
    under a PUBLIC entry in the schema list. Database links are also read
    from ALL_DB_LINKS, for versions whose ALL_OBJECTS leaves them out. Drop
    works for public synonyms and links and for links with dots in their
    name.
  • Windows: no console window with log output next to the app (also none for
    git and other helper programs). Started from a terminal, the logs still
    show there. Problems at startup are shown in a message box, and About has
    an "Open log folder" button.
  • Connect dialog: without the Oracle Instant Client it lists the steps for
    this platform, with the download page as a working link (copying the old
    one picked up a trailing comma and led to a 404) and the Visual C++
    redistributable on Windows.
  • Debugger: a step no longer stops again on the line it started from.
  • Debugger: a step that ended at a breakpoint no longer stops later, after
    continuing, where the step would have ended.
  • Debugger: breakpoints reached while stepping count their hits; stepping
    from a breakpoint doesn't count it twice.
  • Debugger: records in index-by tables show their fields, elements are named
    by their key (('L1')), and watches accept text keys.
  • Debugger: SQL collection types show as not readable instead of NULL.
  • Debugger: after pausing in code without debug information (e.g.
    DBMS_SESSION.SLEEP), the editor shows the nearest frame with source,
    and the variables and watches are that frame's.
  • Debugger: clicking a frame in the call stack didn't open its source.
  • Debugger: globals of a package the session hasn't instantiated yet (e.g.
    a spec loaded for its types, whose constants the compiler inlined where
    they are read) read as NULL. Oracle's agent has no values for them until
    the package is first used; the watch now says so. NULL globals of an
    instantiated package still read as NULL.
  • Completion: after a short list (e.g. filtered down to three matches),
    later lists no longer stay that small until the app restarts.

Full changelog: v0.1.0...v0.2.0