|
| 1 | +--- |
| 2 | +title: Workspaces |
| 3 | +description: Codegate workspaces |
| 4 | +sidebar_position: 40 |
| 5 | +--- |
| 6 | +# CodeGate Workspaces |
| 7 | + |
| 8 | +## Overview |
| 9 | + |
| 10 | +The "Workspaces" feature in CodeGate is designed to help users organize and customize their interactions with large language models (LLMs). Each workspace acts as a distinct environment with its own configurations and resources, allowing for personalized settings and efficient management of different projects or tasks. |
| 11 | + |
| 12 | +## Key Features |
| 13 | + |
| 14 | +- **Custom Configurations**: Each workspace can have its own settings and system prompts for interacting with LLMs, enabling tailored responses and behaviors. |
| 15 | +- **Resource Management**: Workspaces act as containers for bucketing resources within CodeGate, making it easier to manage and switch between different projects. |
| 16 | +- **Isolation and Independence**: Configurations in one workspace do not affect others, providing clarity and precision in how settings are applied. |
| 17 | + |
| 18 | +## Working with Workspaces |
| 19 | + |
| 20 | +### Creating a Workspace |
| 21 | + |
| 22 | +To create a new workspace, use the following command from your chat prompt interface: |
| 23 | + |
| 24 | + codegate workspace add <name> |
| 25 | + |
| 26 | +This initializes a new workspace with the specified name. |
| 27 | + |
| 28 | +Note that workspace names may only contain alphanumeric characters with dashes. |
| 29 | + |
| 30 | +### Switching Workspaces |
| 31 | + |
| 32 | +To switch between workspaces, you can activate a different workspace by using: |
| 33 | + |
| 34 | + codegate workspace activate <name> |
| 35 | + |
| 36 | + |
| 37 | +The active workspace is the current environment for commands and configurations. |
| 38 | + |
| 39 | +### Listing Workspaces |
| 40 | + |
| 41 | +For a quickly accessible overview of all workspaces, including which is currently active, use: |
| 42 | + |
| 43 | + codegate workspace list |
| 44 | + |
| 45 | +### Customizing System Prompts |
| 46 | + |
| 47 | +One of the key advantages of workspaces is the ability to set a custom system prompt. This can be done using the following command: |
| 48 | + |
| 49 | +### Customizing System Prompts |
| 50 | + |
| 51 | +One of the key advantages of workspaces is the ability to set a custom system prompt. This can be done using the following command: |
| 52 | + |
| 53 | + codegate system-prompt -w <workspace_name> set "<system_prompt>" |
| 54 | + |
| 55 | +Replace `<workspace_name>` with your desired workspace and `<system_prompt>` with your custom prompt text. |
| 56 | + |
| 57 | +Note that if you don't specify a workspace explicitly, the command will take an the active workspace into use. |
| 58 | + |
| 59 | +#### Example |
| 60 | + |
| 61 | +Suppose you want to set a custom system prompt for a workspace named "project-alpha": |
| 62 | + |
| 63 | + codegate system-prompt -w project-alpha set "Start each conversation with \"Welcome to Project Alpha Assistant. How can I help today?\"" |
| 64 | + |
| 65 | +This will enhance your prompt when you're working in that workspace. |
| 66 | + |
| 67 | +### Archiving a workspace |
| 68 | + |
| 69 | +In order to "archive" a workspace, use the following command in your prompt: |
| 70 | + |
| 71 | + codegate workspace remove <workspace name> |
| 72 | + |
| 73 | +This will not fully delete the workspace, but will set it in "archived mode". You |
| 74 | +may still recover an archived workspace. |
| 75 | + |
| 76 | +### Listing Archived Workspaces |
| 77 | + |
| 78 | +To view a list of all archived workspaces, use the following command: |
| 79 | + |
| 80 | + codegate workspace list-archived |
| 81 | + |
| 82 | +This command will display all workspaces that have been archived, allowing you to review which projects are stored for potential future use. |
| 83 | + |
| 84 | +### Restoring an Archived Workspace |
| 85 | + |
| 86 | +If you need to reactivate an archived workspace, you can restore it using the following command: |
| 87 | + |
| 88 | + codegate workspace restore <workspace_name> |
| 89 | + |
| 90 | +Replace `<workspace_name>` with the name of the workspace you wish to restore. Once restored, it will appear in your active workspace list. |
| 91 | + |
| 92 | +### Deleting an Archived Workspace |
| 93 | + |
| 94 | +In cases where an archived workspace is no longer needed and can be safely removed, you can permanently delete it with: |
| 95 | + |
| 96 | + codegate workspace delete-archived <workspace_name> |
| 97 | + |
| 98 | +Make sure to double-check before executing this command, as it will permanently remove the specified workspace from your system. |
| 99 | + |
| 100 | + |
| 101 | +## Best Practices |
| 102 | + |
| 103 | +- Utilize workspaces to separate different projects or objectives, ensuring each has a dedicated configuration. |
| 104 | +- Regularly review and update the system prompts to align with the evolving needs of your projects. |
| 105 | +- Use resource bucketing to keep assets organized and easily accessible within their respective workspaces. |
0 commit comments