xref: /plugin/dokullm/doc/profiles.txt (revision 0c069cd55673a5a4547d30d36b6a3953bcae18c3)
168020f72SCostin Stroie====== Profiles ======
268020f72SCostin Stroie
3bad70cfeSCostin Stroie (aider)Profiles in DokuLLM allow you to organize and customize your AI interactions. Each profile can have its own set of actions, prompts, and configurations. By default, the plugin uses the [[default|default]] profile, but you can create and switch between multiple profiles as needed.
468020f72SCostin Stroie
568020f72SCostin Stroie===== Available Profiles =====
668020f72SCostin Stroie
768020f72SCostin StroieThe following profiles are currently available:
8bad70cfeSCostin Stroie (aider)  * [[default|default]] - The standard profile with basic actions
968020f72SCostin Stroie  * //Add your custom profiles here//
1068020f72SCostin Stroie
1168020f72SCostin Stroie===== Creating a New Profile =====
1268020f72SCostin Stroie
1368020f72SCostin StroieTo create a new profile:
1468020f72SCostin Stroie
15*d36001d6SCostin Stroie (aider)  - Create a new namespace at ''dokullm:profiles:PROFILE_NAME'' (replace PROFILE_NAME with your desired profile name)
16*d36001d6SCostin Stroie (aider)  - Create a profile definition page (similar to ''dokullm:profiles:default'') that defines the actions available in this profile
17*d36001d6SCostin Stroie (aider)  - Add prompt pages for each action in your profile
1868020f72SCostin Stroie  - Configure the plugin to use your new profile in the plugin settings
1968020f72SCostin Stroie
20bad70cfeSCostin Stroie (aider)===== Profile Structure =====
2168020f72SCostin Stroie
22*d36001d6SCostin Stroie (aider)Each profile follows a specific namespace structure:
23bad70cfeSCostin Stroie (aider)
24*d36001d6SCostin Stroie (aider)  * ''dokullm:profiles:PROFILE_NAME:'' - Profile namespace
25*d36001d6SCostin Stroie (aider)  * ''dokullm:profiles:PROFILE_NAME:system'' - Base system prompt for the profile
26*d36001d6SCostin Stroie (aider)  * ''dokullm:profiles:PROFILE_NAME:action_name'' - Prompt page for each action
27*d36001d6SCostin Stroie (aider)  * ''dokullm:profiles:PROFILE_NAME:action_name:system'' - Action-specific system prompt extension
28bad70cfeSCostin Stroie (aider)
29bad70cfeSCostin Stroie (aider)===== Profile Action Definition =====
30bad70cfeSCostin Stroie (aider)
31*d36001d6SCostin Stroie (aider)Each profile needs a definition page (like ''dokullm:profiles:default'') that contains a table defining the available actions. The table must have the following columns:
3268020f72SCostin Stroie
3368020f72SCostin Stroie^ ID ^ Label ^ Description ^ Icon ^ Result ^
3468020f72SCostin Stroie| action_id | Button Text | Description of what the action does | icon_name | result_action_type |
3568020f72SCostin Stroie
3668020f72SCostin StroieColumn details:
3768020f72SCostin Stroie  * **ID**: The action identifier, which corresponds to the prompt name
3868020f72SCostin Stroie  * **Label**: The text displayed on the button
3968020f72SCostin Stroie  * **Description**: A detailed description of the action, used as a tooltip
4068020f72SCostin Stroie  * **Icon**: The icon displayed on the button (can be empty)
4168020f72SCostin Stroie  * **Result**: The action to perform with the LLM result:
4268020f72SCostin Stroie    * ''show'': Display the result in a modal dialog
4368020f72SCostin Stroie    * ''append'': Add the result to the end of the current content
4468020f72SCostin Stroie    * ''replace'': Replace the selected content with the result
4568020f72SCostin Stroie    * ''insert'': Insert the result at the cursor position
4668020f72SCostin Stroie
47bad70cfeSCostin Stroie (aider)==== Example Profile Definition ====
4868020f72SCostin Stroie
4968020f72SCostin StroieHere's an example of how to structure your profile action table:
5068020f72SCostin Stroie
5168020f72SCostin Stroie^ ID ^ Label ^ Description ^ Icon ^ Result ^
5268020f72SCostin Stroie| summarize | Summarize | Create a summary of the selected text | file-icons:summary | show |
5368020f72SCostin Stroie| expand | Expand | Expand the selected text with more details | file-icons:expand | replace |
54bad70cfeSCostin Stroie (aider)| grammar | Fix Grammar | Correct grammar and spelling errors | file-icons:spellcheck | replace |
5568020f72SCostin Stroie
5668020f72SCostin Stroie===== Using Profiles =====
5768020f72SCostin Stroie
5868020f72SCostin StroieTo use a specific profile:
5968020f72SCostin Stroie  - Go to the plugin configuration page
6068020f72SCostin Stroie  - Find the "Prompt Profile" setting
6168020f72SCostin Stroie  - Enter the name of the profile you want to use
6268020f72SCostin Stroie  - Save the configuration
6368020f72SCostin Stroie
6468020f72SCostin StroieThe selected profile will be used for all LLM interactions until you change it.
6568020f72SCostin Stroie
66bad70cfeSCostin Stroie (aider)===== Adding Custom Prompts =====
6768020f72SCostin Stroie
68*d36001d6SCostin Stroie (aider)Each action in your profile corresponds to a prompt page. To add a custom prompt:
69*d36001d6SCostin Stroie (aider)  - Create a new page at ''dokullm:profiles:PROFILE_NAME:PROMPT_NAME'' (replace PROFILE_NAME with your profile and PROMPT_NAME with your action ID)
70*d36001d6SCostin Stroie (aider)  - Write your prompt in this page, using placeholders as needed:
7168020f72SCostin Stroie    * ''{text}'' - The selected text from the editor or the entire text
7268020f72SCostin Stroie    * ''{template}'' - The template associated with the request
7368020f72SCostin Stroie    * The prompt will automatically be available through the action defined in your profile
7468020f72SCostin Stroie
75bad70cfeSCostin Stroie (aider)===== System Prompt Extensions =====
76bad70cfeSCostin Stroie (aider)
77bad70cfeSCostin Stroie (aider)Profiles support a hierarchical system prompt architecture:
78bad70cfeSCostin Stroie (aider)
79*d36001d6SCostin Stroie (aider)  * Base system prompt at ''dokullm:profiles:PROFILE_NAME:system''
80*d36001d6SCostin Stroie (aider)  * Action-specific extensions at ''dokullm:profiles:PROFILE_NAME:ACTION_NAME:system''
81bad70cfeSCostin Stroie (aider)  * Extensions are automatically appended to the base system prompt
82bad70cfeSCostin Stroie (aider)
8368020f72SCostin Stroie===== Metadata Support =====
8468020f72SCostin Stroie
85bad70cfeSCostin Stroie (aider)DokuLLM supports metadata in your wiki pages, which can be used to provide additional context to the LLM:
8668020f72SCostin Stroie  * ''~~LLM_TEMPLATE:template_id~~'' - Specifies a template to use as context
8768020f72SCostin Stroie  * ''~~LLM_EXAMPLES:example1,example2~~'' - Specifies example pages to use as context
8868020f72SCostin Stroie  * ''~~LLM_PREVIOUS:previous_page~~'' - Specifies a previous document to use as context
8968020f72SCostin Stroie
9068020f72SCostin StroieThese metadata tags should be placed at the beginning of your wiki page.
91