Remove unused test files and tokenization modules

- Deleted `windowDelineation.test.ts` as it is no longer needed.
- Removed `index.ts` and `tokenizer.ts` from the tokenization module due to refactoring.
- Eliminated unused types related to authentication, code citation, context provider API, and core functionalities.
- Cleaned up the `status.ts` file by removing the `StatusKind` type definition.
This commit is contained in:
2026-02-16 22:49:32 +08:00
parent 71a71530a3
commit 0d25f4d1ef
346 changed files with 17 additions and 120182 deletions
+11 -1
View File
@@ -1,4 +1,11 @@
from typing import Tuple
from datetime import datetime, timezone, timedelta
def _get_current_datetime() -> str:
now = datetime.now(timezone(timedelta(hours=8)))
weekdays = ["星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"]
weekday = weekdays[now.weekday()]
return f"{now.year}{now.month}{now.day}{weekday} {now.hour:02d}:{now.minute:02d}:{now.second:02d}"
def _sanitize_language_id(language_id: str) -> str:
if not language_id:
@@ -25,8 +32,11 @@ def prepare_prompt_context(prefix: str, suffix: str) -> Tuple[str, str]:
def build_prompt(prefix: str, suffix: str, language_id: str = "markdown") -> str:
safe_language_id = _sanitize_language_id(language_id)
recent_prefix, recent_suffix = _prepare_context(prefix, suffix)
current_time = _get_current_datetime()
prompt = f"""You are an inline completion engine for a {safe_language_id} editor with ghost-text suggestions.
prompt = f"""Current time: {current_time}
You are an inline completion engine for a {safe_language_id} editor with ghost-text suggestions.
Your job:
- Return ONLY the text that should be inserted at the cursor between PREFIX and SUFFIX.