Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/toolbox/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ dependencies = [
"tabulate>=0.9.0",
"typer>=0.16.0",
"uvicorn>=0.34.3",
"leveldb-312==1.0.0",
"pycookiecheat==0.8.0"
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@ def gather_tokens_and_cookie(context: "InstallationContext"):

class SlackAuthCallback(Callback):
def on_install_init(self, context: "InstallationContext", json_body: dict):
try:
slack_token, slack_d_cookie = gather_tokens_and_cookie(context)
context.context_settings["SLACK_TOKEN"] = slack_token
context.context_settings["SLACK_D_COOKIE"] = slack_d_cookie
return
except Exception as e:
print(f"Error getting tokens and cookie: {e}")

workspace = input("Enter Slack workspace name: ")
token, d_cookie = do_browser_auth(workspace, "chromium")
context.context_settings["SLACK_TOKEN"] = token
context.context_settings["SLACK_D_COOKIE"] = d_cookie
# try:
# slack_token, slack_d_cookie = gather_tokens_and_cookie(context)
# context.context_settings["SLACK_TOKEN"] = slack_token
# context.context_settings["SLACK_D_COOKIE"] = slack_d_cookie
# return
# except Exception as e:
# print(f"Error getting tokens and cookie: {e}")

workspace = input("Enter Slack workspace name: ")
token, d_cookie = do_browser_auth(workspace, "chromium")
context.context_settings["SLACK_TOKEN"] = token
context.context_settings["SLACK_D_COOKIE"] = d_cookie

def on_run_mcp(self, context: "InstallationContext"):
from toolbox.store.store_code import STORE_ELEMENTS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import sys
import tempfile

import leveldb
# import leveldb
import pycookiecheat
from pathlib import Path

Expand Down Expand Up @@ -49,9 +49,9 @@ def try_to_copy_and_read_leveldb(leveldb_path):
lock_file = tmp_leveldb_path / "LOCK"
if lock_file.exists():
lock_file.unlink()

db = leveldb.LevelDB(str(tmp_leveldb_path))
return db
return None
# db = leveldb.LevelDB(str(tmp_leveldb_path))
# return db


def get_config(db):
Expand Down