# tui/auto-tag Auto-assign a unique instance tag on the calling panel. Returns the assigned tag string. When multiple instances of the same app are launched (e.g., several editor panels), each instance needs a unique tag so other panels can distinguish them. `tui/auto-tag` assigns tags like `"editor"`, `"editor2"`, `"editor3"`, etc. ## Syntax
[tui/auto-tag arg1]
## Parameters - `arg1` — base name for the tag (string) ## Returns The assigned tag as a string (e.g. `"editor"` or `"editor2"`). ## Behavior 1. If the panel already has a tag starting with the base, it is kept. 2. If no other panel uses the exact base tag, the base is assigned directly. 3. Otherwise, the next available numbered variant is chosen: `base2`, `base3`, ... ## Example
# In editor init:
set my-tag [tui/auto-tag "editor"]
# First editor → my-tag = "editor"
# Second editor → my-tag = "editor2"

# Other panels can find any editor instance:
set ed [tui/find-panel "editor"]
# Finds "editor", "editor2", etc. Prefers the focused panel.