mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-04-29 10:26:23 +02:00
select workspace
This commit is contained in:
parent
36f700cc77
commit
6cd5abce48
7 changed files with 303 additions and 53 deletions
|
|
@ -83,13 +83,15 @@ agent-slack canvas get F01234567 --workspace https://team.slack.com
|
|||
|
||||
## 3. Multi-Workspace
|
||||
|
||||
If the user has multiple workspaces configured, use \`--workspace <url>\` to disambiguate:
|
||||
**Important:** The user has chosen which workspaces to use. Before your first Slack operation, read \`~/.rowboat/config/slack.json\` to see the selected workspaces. Only interact with workspaces listed in that config — ignore any other authenticated workspaces.
|
||||
|
||||
If the selected workspace list contains multiple entries, use \`--workspace <url>\` to disambiguate:
|
||||
|
||||
\`\`\`
|
||||
agent-slack message list "#general" --workspace https://team.slack.com
|
||||
\`\`\`
|
||||
|
||||
Use \`agent-slack auth whoami\` to see all configured workspaces.
|
||||
If only one workspace is selected, always use \`--workspace\` with its URL to avoid ambiguity with other authenticated workspaces.
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ export interface ISlackConfigRepo {
|
|||
|
||||
export class FSSlackConfigRepo implements ISlackConfigRepo {
|
||||
private readonly configPath = path.join(WorkDir, 'config', 'slack.json');
|
||||
private readonly defaultConfig: SlackConfig = { enabled: false };
|
||||
private readonly defaultConfig: SlackConfig = { enabled: false, workspaces: [] };
|
||||
|
||||
constructor() {
|
||||
this.ensureConfigFile();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,13 @@
|
|||
import z from "zod";
|
||||
|
||||
export const SlackWorkspace = z.object({
|
||||
url: z.string(),
|
||||
name: z.string(),
|
||||
});
|
||||
export type SlackWorkspace = z.infer<typeof SlackWorkspace>;
|
||||
|
||||
export const SlackConfig = z.object({
|
||||
enabled: z.boolean(),
|
||||
workspaces: z.array(SlackWorkspace).default([]),
|
||||
});
|
||||
export type SlackConfig = z.infer<typeof SlackConfig>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue