> ## Documentation Index
> Fetch the complete documentation index at: https://sonamu.cartanova.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Key Features

> Key features of Sonamu VS Code Extension

The Sonamu Extension integrates with the Naite test framework to provide various development support features.

## Naite Key Autocomplete

When typing `Naite.t("`, `Naite.del("`, `Naite.get("`, all Naite keys in the project are autocompleted.

<Frame caption="Naite Key Autocomplete" />

### How It Works

The Extension scans all TypeScript files in the workspace and collects keys used in `Naite.t()` calls. This key list is provided as autocomplete candidates.

## Key Navigation

You can quickly jump to definition and reference locations from Naite key strings.

### Go to Definition

* **Shortcut**: F12
* **Action**: Jump to `Naite.t("key")` location

<Frame>
  <video autoPlay muted loop playsInline controls className="w-full rounded-xl" src="https://mintcdn.com/cartanova-7788888c/gHShQ4W7H-WpAKgp/images/vscode-extension6.mp4?fit=max&auto=format&n=gHShQ4W7H-WpAKgp&q=85&s=c86f7adaaa95e825c0f3661b355d4826" data-path="images/vscode-extension6.mp4" />
</Frame>

### Go to References

* **Shortcut**: Shift+F12
* **Action**: Display list of `Naite.get("key")`, `Naite.del("key")` locations

<Frame>
  <video autoPlay muted loop playsInline controls className="w-full rounded-xl" src="https://mintcdn.com/cartanova-7788888c/gHShQ4W7H-WpAKgp/images/vscode-extension7.mp4?fit=max&auto=format&n=gHShQ4W7H-WpAKgp&q=85&s=0a592193730b851732e0595caa1a0561" data-path="images/vscode-extension7.mp4" />
</Frame>

### Cmd+Click

Cmd+Click behavior depends on VS Code settings and jumps to definition or references:

* `editor.gotoLocation.multipleDefinitions`: Behavior when multiple definitions exist
* `editor.gotoLocation.multipleReferences`: Behavior when multiple references exist

## Key Highlighting

Applies visual decoration to Naite key strings for easy identification in code.

<Frame caption="Key Highlighting" />

### Settings

Enable/disable with `sonamu.naite.decoration.enabled`, and change style with `sonamu.naite.decoration.style`:

* `underline` (default)
* `bold`
* `italic`
* `underline bold`
* `underline italic`
* `none`

## Hover Information

Hover over a Naite key to display usage information for that key.

<Frame caption="Hover Information">
  <img src="https://mintcdn.com/cartanova-7788888c/gHShQ4W7H-WpAKgp/images/vscode-extension8.png?fit=max&auto=format&n=gHShQ4W7H-WpAKgp&q=85&s=61394d8df82e50b01d96a783051ae4e2" alt="Hover Information" width="1180" height="178" data-path="images/vscode-extension8.png" />
</Frame>

## Inline Value Display

After running tests, displays recorded values inline next to `Naite.t()` calls.

```typescript theme={null}
Naite.t("result", data); // → { id: 1, name: "test" }
```

<Frame caption="Inline Value Display">
  <video autoPlay muted loop playsInline controls className="w-full rounded-xl" src="https://mintcdn.com/cartanova-7788888c/09gTEtoClHbNLmVh/images/vscode-extension9.mp4?fit=max&auto=format&n=09gTEtoClHbNLmVh&q=85&s=6b7e3ea5577004fc3c0d587d0ff551e7" data-path="images/vscode-extension9.mp4" />
</Frame>

### Settings

* `sonamu.naite.runtimeValue.enabled`: Enable/disable feature (default: `true`)
* `sonamu.naite.runtimeValue.maxLength`: Maximum length of displayed value (default: `50`)

Long values are automatically truncated.

## Naite Trace Viewer

A dedicated viewer to check all values recorded with `Naite.t()` during test execution in real-time.

<Frame caption="Naite Trace Viewer">
  <video autoPlay muted loop playsInline controls className="w-full rounded-xl" src="https://mintcdn.com/cartanova-7788888c/09gTEtoClHbNLmVh/images/vscode-extension10.mp4?fit=max&auto=format&n=09gTEtoClHbNLmVh&q=85&s=716921a5755ff687193f1fa7b3807e37" data-path="images/vscode-extension10.mp4" />
</Frame>

### Opening

Run `Sonamu: Open Naite Trace Viewer` from the Command Palette, or it opens automatically when running tests.

### Key Features

**Grouping by Test**

Traces are displayed grouped by test suite and case.

<Frame caption="Grouping by Test">
  <img src="https://mintcdn.com/cartanova-7788888c/09gTEtoClHbNLmVh/images/vscode-extension11.png?fit=max&auto=format&n=09gTEtoClHbNLmVh&q=85&s=5de3d0fc8d46d5fe89d434ebde414de1" alt="Grouping by Test" style={{ width: "70%", borderRadius: "8px" }} width="1510" height="1664" data-path="images/vscode-extension11.png" />
</Frame>

**Trace Information Display**

Each trace includes the following information:

* Key name
* Recorded value (JSON format)
* File path and line number
* Recording time

**Jump to Code Location**

Click a trace to jump to that `Naite.t()` call location.

<Frame caption="Jump to Code Location">
  <video autoPlay muted loop playsInline controls className="w-full rounded-xl" src="https://mintcdn.com/cartanova-7788888c/09gTEtoClHbNLmVh/images/vscode-extension12.mp4?fit=max&auto=format&n=09gTEtoClHbNLmVh&q=85&s=6e0ad2503a28ed420594c2b71737fdfc" data-path="images/vscode-extension12.mp4" />
</Frame>

**Search Feature**

Search by key or value within the Trace viewer.

<Frame caption="Trace Search">
  <video autoPlay muted loop playsInline controls className="w-full rounded-xl" src="https://mintcdn.com/cartanova-7788888c/09gTEtoClHbNLmVh/images/vscode-extension13.mp4?fit=max&auto=format&n=09gTEtoClHbNLmVh&q=85&s=08cb2e3faae63d408000f9a8af742ce5" data-path="images/vscode-extension13.mp4" />
</Frame>

**Follow Mode**

When selecting a Naite call in code, the Trace Viewer automatically scrolls to that item.

### Vitest Setup

To display test case line numbers, set `includeTaskLocation: true` in `vitest.config.ts`:

```typescript theme={null}
export default defineConfig({
  test: {
    includeTaskLocation: true,
  },
});
```

## Symbol Search

Search for Naite keys in Workspace Symbol Search.

* **Shortcut**: Cmd+T
* **Usage**: Type key name to find all usage locations

<Frame caption="Symbol Search">
  <video autoPlay muted loop playsInline controls className="w-full rounded-xl" src="https://mintcdn.com/cartanova-7788888c/09gTEtoClHbNLmVh/images/vscode-extension14.mp4?fit=max&auto=format&n=09gTEtoClHbNLmVh&q=85&s=4ab3677ee5389618cf9195ff6986b99d" data-path="images/vscode-extension14.mp4" />
</Frame>

## Undefined Key Warnings

Displays warnings when `Naite.get()` or `Naite.del()` references a key that hasn't been defined with `Naite.t()`. Warnings can be viewed in the VS Code Problems panel (Cmd+Shift+M).

<Frame caption="Undefined Key Warnings">
  <img src="https://mintcdn.com/cartanova-7788888c/E_xghIsQZ4iAGOf_/images/vscode-extension15.png?fit=max&auto=format&n=E_xghIsQZ4iAGOf_&q=85&s=2dc970ded956879c7ab37c8b7bb7036d" alt="Undefined Key Warnings" style={{ width: "70%", borderRadius: "8px" }} width="1812" height="544" data-path="images/vscode-extension15.png" />
</Frame>

This feature is useful for quickly finding typos or missing keys.

## View Container

The Extension adds a "Naite" View Container to the panel area.

<Frame caption="Naite View Container">
  <img src="https://mintcdn.com/cartanova-7788888c/E_xghIsQZ4iAGOf_/images/vscode-extension16.png?fit=max&auto=format&n=E_xghIsQZ4iAGOf_&q=85&s=78f029d6af34211013ac79d230981784" alt="Naite View Container" style={{ width: "70%", borderRadius: "8px" }} width="2406" height="1032" data-path="images/vscode-extension16.png" />
</Frame>

You can quickly check Trace information from this panel.

## Status Bar Messages

Displays notification messages in the status bar when Naite tracker actions occur (key add, delete, etc.).

Enable/disable with `sonamu.naite.statusBarMessages.enabled` setting (default: `true`).
