6ede33ccdb
Build and Push Docker Images / create_manifest (web, surfsense-web, , cpu) (push) Has been cancelled
Build and Push Docker Images / finalize_release (push) Has been cancelled
Obsidian Plugin Lint / lint (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_web, cpu, ./surfsense_web/Dockerfile, web, surfsense-web, ubuntu-24.04-arm, linux/arm64, arm64, , runner, false, cpu) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_web, cpu, ./surfsense_web/Dockerfile, web, surfsense-web, ubuntu-latest, linux/amd64, amd64, , runner, false, cpu) (push) Has been cancelled
Build and Push Docker Images / compute_version (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, cpu, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-24.04-arm, linux/arm64, arm64, , production, false, cpu) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, cpu, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-latest, linux/amd64, amd64, , production, false, cpu) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, cu126, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-24.04-arm, linux/arm64, arm64, -cuda126, production, true, cuda126) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, cu126, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-latest, linux/amd64, amd64, -cuda126, production, true, cuda126) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, cu128, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-24.04-arm, linux/arm64, arm64, -cuda, production, true, cuda) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, cu128, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-latest, linux/amd64, amd64, -cuda, production, true, cuda) (push) Has been cancelled
Build and Push Docker Images / verify_digests (push) Has been cancelled
Build and Push Docker Images / create_manifest (backend, surfsense-backend, , cpu) (push) Has been cancelled
Build and Push Docker Images / create_manifest (backend, surfsense-backend, -cuda, cuda) (push) Has been cancelled
Build and Push Docker Images / create_manifest (backend, surfsense-backend, -cuda126, cuda126) (push) Has been cancelled
42 lines
1.0 KiB
Python
42 lines
1.0 KiB
Python
"""Provider-neutral command hooks for external chat gateways."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from app.gateway.base.adapter import BasePlatformAdapter, ParsedInboundEvent
|
|
|
|
|
|
def command_name(text: str | None) -> str | None:
|
|
if not text or not text.startswith("/"):
|
|
return None
|
|
return text.split(maxsplit=1)[0].split("@", 1)[0].lower()
|
|
|
|
|
|
class BaseGatewayCommands:
|
|
"""Default command behavior for platforms without slash-command onboarding."""
|
|
|
|
async def handle_start_command(
|
|
self,
|
|
*,
|
|
session,
|
|
adapter: BasePlatformAdapter,
|
|
event: ParsedInboundEvent,
|
|
) -> bool:
|
|
return False
|
|
|
|
async def handle_help_command(
|
|
self,
|
|
*,
|
|
adapter: BasePlatformAdapter,
|
|
event: ParsedInboundEvent,
|
|
) -> bool:
|
|
return False
|
|
|
|
async def send_unbound_onboarding(
|
|
self,
|
|
*,
|
|
adapter: BasePlatformAdapter,
|
|
event: ParsedInboundEvent,
|
|
dashboard_url: str,
|
|
) -> None:
|
|
return None
|