Codumentor logo Codumentor

Permalink Plugin

Turns file-path mentions in the agent's reply into clickable links on your Git hosting platform.

Recognized automatically from the repo URL:

PlatformURL pattern
GitHubgithub.com
GitLab.comgitlab.com
Gitea / Forgejohostname contains gitea. or forgejo.
Codebergcodeberg.org
Bitbucketbitbucket.org
Azure DevOpsdev.azure.com or *.visualstudio.com

Self-hosted GitLab (or anything else that does not match those patterns) needs options.platform or options.permalink_template on the repo.

Only the main agent's replies are rewritten. Subagent output is left unchanged. Paths already inside Markdown links, and paths inside fenced code blocks, are left as-is. Unresolvable paths are left as-is.

If Branch Switching is active, links use the conversation's current branch instead of the repo's configured ref (unless the repo is pinned to a commit).

Configuration

plugins:
  - module: codumentor.plugins.permalink
    class: PermalinkPlugin
    args:
      enabled: true
      link_format: markdown   # or 'plain' for bare URLs (default: 'markdown')

Parameters

KeyTypeDefaultDescription
enabledbooltrueMaster switch.
link_format"markdown" or "plain""markdown"Markdown links (` path `) or bare URLs.

Per-repository overrides

repos:
  - url: https://git.example.com/org/repo.git
    name: MyRepo
    options:
      # Force a built-in URL layout when auto-detect would miss
      # (github, gitlab, gitea, bitbucket, azure_devops):
      platform: gitlab
      # Or a full custom template. Placeholders: {base_url}, {owner},
      # {repo}, {org}, {project}, {commit}, {path}
      permalink_template: "{base_url}/{owner}/{repo}/-/blob/{commit}/{path}"

permalink_template wins over platform. Repos that only have a local path (no url) never get permalinks.

What gets linked

In order, in each reply:

  1. Full repo pathsMyRepo/src/utils.py
  2. Relative pathssrc/utils.py or src/utils/
  3. Bare filenamesutils.py (common code/doc extensions only)

Relative paths and bare names are resolved from files the agent already opened in this conversation when that is unambiguous, otherwise from a unique match across configured repos. Ambiguous names are left unchanged.