Skip to content

Commit a60733a

Browse files
committed
Add initial documentation on workspaces
This does not yet document the UI, but it does document the workspace prompt CLI. Signed-off-by: Juan Antonio Osorio <[email protected]>
1 parent e0b535c commit a60733a

File tree

1 file changed

+136
-0
lines changed

1 file changed

+136
-0
lines changed

docs/features/workspaces.md

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

0 commit comments

Comments
 (0)