(ctx context.Context)
| 83 | } |
| 84 | |
| 85 | func determineScopes(ctx context.Context) ([]string, error) { |
| 86 | connData := genconn.GetConnData(ctx) |
| 87 | if connData == nil { |
| 88 | return nil, fmt.Errorf("context did not contain connection info") |
| 89 | } |
| 90 | // resolve windowId from blockId |
| 91 | tabId, err := wstore.DBFindTabForBlockId(ctx, connData.BlockId) |
| 92 | if err != nil { |
| 93 | return nil, fmt.Errorf("unabled to determine tab for route: %w", err) |
| 94 | } |
| 95 | workspaceId, err := wstore.DBFindWorkspaceForTabId(ctx, tabId) |
| 96 | if err != nil { |
| 97 | return nil, fmt.Errorf("unabled to determine workspace for route: %w", err) |
| 98 | } |
| 99 | windowId, err := wstore.DBFindWindowForWorkspaceId(ctx, workspaceId) |
| 100 | if err != nil { |
| 101 | return nil, fmt.Errorf("unabled to determine window for route: %w", err) |
| 102 | } |
| 103 | |
| 104 | return []string{windowId}, nil |
| 105 | } |
| 106 | |
| 107 | func (p *FrontendProvider) GetUserInput(ctx context.Context, request *UserInputRequest) (*UserInputResponse, error) { |
| 108 | id, uiCh := MainUserInputHandler.registerChannel() |
no test coverage detected