Skip to content

Commit b215677

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 b215677

File tree

1 file changed

+135
-0
lines changed

1 file changed

+135
-0
lines changed

docs/features/workspaces.md

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

0 commit comments

Comments
 (0)