|
1 | 1 | --- |
2 | 2 | title: Workspaces |
3 | | -description: Codegate workspaces |
| 3 | +description: Organize and customize your project environments |
4 | 4 | sidebar_position: 40 |
5 | 5 | --- |
6 | 6 |
|
7 | 7 | ## Overview |
8 | 8 |
|
9 | | -The "Workspaces" feature in CodeGate is designed to help users organize and |
10 | | -customize their interactions with large language models (LLMs). Each workspace |
11 | | -acts as a distinct environment with its own configurations and resources, |
12 | | -allowing for personalized settings and efficient management of different |
13 | | -projects or tasks. |
| 9 | +_Workspaces_ in CodeGate allow you to organize and customize your interactions |
| 10 | +with large language models (LLMs). Each workspace is a distinct environment with |
| 11 | +its own configurations and resources, enabling personalized settings and |
| 12 | +efficient management of different projects or tasks. |
14 | 13 |
|
15 | | -## Key Features |
| 14 | +## Key features |
16 | 15 |
|
17 | | -- **Custom Configurations**: Each workspace can have its own settings and system |
| 16 | +- **Custom configurations**: Each workspace can have its own settings and system |
18 | 17 | prompts for interacting with LLMs, enabling tailored responses and behaviors. |
19 | | -- **Resource Management**: Workspaces act as containers for bucketing resources |
20 | | - within CodeGate, making it easier to manage and switch between different projects. |
21 | | -- **Isolation and Independence**: Configurations in one workspace do not affect |
| 18 | +- **Resource management**: Workspaces act as containers for organizing resources |
| 19 | + within CodeGate, making it easier to manage and switch between different |
| 20 | + projects. |
| 21 | +- **Isolation and independence**: Configurations in one workspace do not affect |
22 | 22 | others, providing clarity and precision in how settings are applied. |
23 | 23 |
|
24 | | -## Working with Workspaces |
| 24 | +## Working with workspaces |
25 | 25 |
|
26 | | -### Creating a Workspace |
| 26 | +:::info Default workspace |
27 | 27 |
|
28 | | -To create a new workspace, use the following command from your chat prompt interface: |
| 28 | +CodeGate ships with a default workspace named `default`. This workspace cannot |
| 29 | +be renamed, archived, or deleted. |
29 | 30 |
|
30 | | -```bash |
31 | | -codegate workspace add $NAME |
| 31 | +::: |
| 32 | + |
| 33 | +You can manage workspaces using `codegate workspace` commands sent through your |
| 34 | +AI assistant's chat interface. To see all available commands: |
| 35 | + |
| 36 | +```plain |
| 37 | +codegate workspace -h |
32 | 38 | ``` |
33 | 39 |
|
34 | | -This initializes a new workspace with the specified name. |
| 40 | +:::note |
35 | 41 |
|
36 | | -Note that workspace names may only contain alphanumeric characters with dashes. |
| 42 | +Currently, workspaces are not shown in the CodeGate dashboard. Stay tuned! |
37 | 43 |
|
38 | | -### Switching Workspaces |
| 44 | +::: |
39 | 45 |
|
40 | | -To switch between workspaces, you can activate a different workspace by using: |
| 46 | +### Create a workspace {#add} |
41 | 47 |
|
42 | | -```bash |
43 | | -codegate workspace activate $NAME |
| 48 | +To create a new workspace: |
| 49 | + |
| 50 | +```plain |
| 51 | +codegate workspace add WORKSPACE_NAME |
44 | 52 | ``` |
45 | 53 |
|
46 | | -The active workspace is the current environment for commands and configurations. |
| 54 | +Replace `WORKSPACE_NAME` with a name for the new workspace. Names can only |
| 55 | +contain alphanumeric characters, hyphens (`-`), and underscores (`_`). |
47 | 56 |
|
48 | | -### Listing Workspaces |
| 57 | +:::note |
49 | 58 |
|
50 | | -For a quickly accessible overview of all workspaces, including which is currently |
51 | | -active, use: |
| 59 | +Workspace names are case-sensitive. |
52 | 60 |
|
53 | | -```bash |
| 61 | +::: |
| 62 | + |
| 63 | +### List workspaces {#list} |
| 64 | + |
| 65 | +Get a list of all non-archived workspaces: |
| 66 | + |
| 67 | +```plain |
54 | 68 | codegate workspace list |
55 | 69 | ``` |
56 | 70 |
|
57 | | -### Customizing System Prompts |
| 71 | +The currently active workspace is indicated as **(active)** in the list. |
58 | 72 |
|
59 | | -One of the key advantages of workspaces is the ability to set a custom system |
60 | | -prompt. This can be done using the following command: |
| 73 | +### Activate a workspace {#activate} |
61 | 74 |
|
62 | | -```bash |
63 | | -codegate system-prompt -w $WORKSPACE_NAME set $SYSTEM_PROMPT |
| 75 | +Switch between workspaces using the `activate` command. The active workspace is |
| 76 | +the current environment for commands and configuration. |
| 77 | + |
| 78 | +```plain |
| 79 | +codegate workspace activate WORKSPACE_NAME |
64 | 80 | ``` |
65 | 81 |
|
66 | | -Replace `$WORKSPACE_NAME` with your desired workspace and `$SYSTEM_PROMPT` with |
67 | | -your custom prompt text. |
| 82 | +Replace `WORKSPACE_NAME` with the name of the workspace to activate |
| 83 | +(case-sensitive). |
68 | 84 |
|
69 | | -Note that if you don't specify a workspace explicitly, the command will take an |
70 | | -the active workspace into use. |
| 85 | +### Customize the system prompt {#system-prompt} |
71 | 86 |
|
72 | | -#### Example |
| 87 | +One of the key advantages of workspaces is the ability to customize the system |
| 88 | +prompt with extra project-specific context or instructions. |
73 | 89 |
|
74 | | -Suppose you want to set a custom system prompt for a workspace named "project-alpha": |
| 90 | +```plain |
| 91 | +codegate system-prompt [-w WORKSPACE_NAME] set SYSTEM_PROMPT |
| 92 | +``` |
75 | 93 |
|
76 | | -```bash |
| 94 | +Replace `SYSTEM_PROMPT` with your custom prompt text. |
| 95 | + |
| 96 | +Optionally, specify the workspace to modify with `-w WORKSPACE_NAME`. If you |
| 97 | +don't explicitly set a workspace, the currently active workspace is modified. |
| 98 | + |
| 99 | +**Example**: Set a custom system prompt for the workspace named "project-alpha": |
| 100 | + |
| 101 | +```plain |
77 | 102 | codegate system-prompt -w project-alpha set Start each conversation with "Welcome to Project Alpha Assistant. How can I help today?" |
78 | 103 | ``` |
79 | 104 |
|
80 | | -This will enhance your prompt when you're working in that workspace. |
| 105 | +### Rename a workspace {#rename} |
81 | 106 |
|
82 | | -### Archiving a workspace |
| 107 | +To change the name of an existing workspace: |
83 | 108 |
|
84 | | -In order to "archive" a workspace, use the following command in your prompt: |
| 109 | +```plain |
| 110 | +codegate workspace rename WORKSPACE_NAME NEW_WORKSPACE_NAME |
| 111 | +``` |
85 | 112 |
|
86 | | -```bash |
87 | | -codegate workspace remove $WORKSPACE_NAME |
| 113 | +Replace `WORKSPACE_NAME` with the current name of the workspace, and |
| 114 | +`NEW_WORKSPACE_NAME` with the new name to set. |
| 115 | + |
| 116 | +### Archive a workspace {#archive} |
| 117 | + |
| 118 | +You can mark a workspace as archived without permanently deleting it. This is |
| 119 | +useful in situations when you are not actively working on a project but may want |
| 120 | +to come back to it later. |
| 121 | + |
| 122 | +```plain |
| 123 | +codegate workspace remove WORKSPACE_NAME |
88 | 124 | ``` |
89 | 125 |
|
90 | | -This will not fully delete the workspace, but will set it in "archived mode". You |
91 | | -may still recover an archived workspace. |
| 126 | +Replace `WORKSPACE_NAME` with the name of the workspace to archive. Archived |
| 127 | +workspaces can be [restored](#restore) later or [permanently deleted](#delete). |
92 | 128 |
|
93 | | -### Listing Archived Workspaces |
| 129 | +### List archived workspaces {#list-archived} |
94 | 130 |
|
95 | | -To view a list of all archived workspaces, use the following command: |
| 131 | +Get a list of all archived workspaces: |
96 | 132 |
|
97 | | -```bash |
| 133 | +```plain |
98 | 134 | codegate workspace list-archived |
99 | 135 | ``` |
100 | 136 |
|
101 | | -This command will display all workspaces that have been archived, allowing you |
102 | | -to review which projects are stored for potential future use. |
| 137 | +Archived workspaces can be [restored](#restore) or |
| 138 | +[permanently deleted](#delete), but cannot be activated. |
103 | 139 |
|
104 | | -### Restoring an Archived Workspace |
| 140 | +### Restore an archived workspace {#restore} |
105 | 141 |
|
106 | | -If you need to reactivate an archived workspace, you can restore it using the |
107 | | -following command: |
| 142 | +Use the `restore` command to recover an [archived](#archive) workspace. Once |
| 143 | +restored, a workspace will appear in your available [workspace list](#list) and |
| 144 | +can be [activated](#activate). |
108 | 145 |
|
109 | 146 | ```bash |
110 | | -codegate workspace restore $WORKSPACE_NAME |
| 147 | +codegate workspace restore WORKSPACE_NAME |
111 | 148 | ``` |
112 | 149 |
|
113 | | -Replace `$WORKSPACE_NAME` with the name of the workspace you wish to restore. |
114 | | -Once restored, it will appear in your active workspace list. |
| 150 | +Replace `WORKSPACE_NAME` with the name of the workspace to restore. |
115 | 151 |
|
116 | | -### Deleting an Archived Workspace |
| 152 | +### Permanently delete a workspace {#delete} |
117 | 153 |
|
118 | | -In cases where an archived workspace is no longer needed and can be safely removed, |
119 | | -you can permanently delete it with: |
| 154 | +The `delete-archived` command permanently deletes an archived workspace. |
120 | 155 |
|
121 | 156 | ```bash |
122 | | -codegate workspace delete-archived $WORKSPACE_NAME |
| 157 | +codegate workspace delete-archived WORKSPACE_NAME |
123 | 158 | ``` |
124 | 159 |
|
125 | | -Make sure to double-check before executing this command, as it will permanently |
126 | | -remove the specified workspace from your system. |
| 160 | +Replace `WORKSPACE_NAME` with the name of the workspace to delete. |
| 161 | + |
| 162 | +:::warning |
| 163 | + |
| 164 | +Deletion is permanent. Ensure that the workspace is no longer needed and can be |
| 165 | +safely removed. There is no confirmation when you run this command. |
| 166 | + |
| 167 | +::: |
127 | 168 |
|
128 | | -## Best Practices |
| 169 | +## Recommendations |
129 | 170 |
|
130 | | -- Utilize workspaces to separate different projects or objectives, ensuring each |
131 | | - has a dedicated configuration. |
132 | | -- Regularly review and update the system prompts to align with the evolving needs |
133 | | - of your projects. |
| 171 | +- Use workspaces to separate different projects or objectives, ensuring each has |
| 172 | + a dedicated configuration. |
| 173 | +- Regularly review and update the system prompts to align with the evolving |
| 174 | + needs of your projects. |
134 | 175 | - Use resource bucketing to keep assets organized and easily accessible within |
135 | 176 | their respective workspaces. |
0 commit comments