**Remove dead links and redundant comments; improve styling and clarity across multiple files**

- Removed outdated links and unused properties in Sidebar and Welcome Home Text files.
- Dropped extraneous comments and consolidated imports in server files for streamlined code.
- Enhanced MarkdownEditor visuals with a colorful border for better user experience.
This commit is contained in:
geoffsee
2025-06-24 15:23:34 -04:00
parent a367812fe7
commit bdbc8de6d5
6 changed files with 7 additions and 40 deletions

View File

@@ -1,5 +1,5 @@
import { Utils } from "./utils.ts";
import few_shots from "../prompts/few_shots.ts";
import { Utils } from "./utils";
import few_shots from "../prompts/few_shots";
export class AssistantSdk {
static getAssistantPrompt(params: {
@@ -12,12 +12,10 @@ export class AssistantSdk {
userTimezone = "UTC",
userLocation = "",
} = params;
// Handle both nested and flat few_shots structures
// console.log('[DEBUG_LOG] few_shots:', JSON.stringify(few_shots));
let selectedFewshots = Utils.selectEquitably?.(few_shots);
// console.log('[DEBUG_LOG] selectedFewshots after Utils.selectEquitably:', JSON.stringify(selectedFewshots));
if (!selectedFewshots) {
// If Utils.selectEquitably returns undefined, use few_shots directly
selectedFewshots = few_shots;
// console.log('[DEBUG_LOG] selectedFewshots after fallback:', JSON.stringify(selectedFewshots));
}
@@ -30,7 +28,7 @@ export class AssistantSdk {
return `# Assistant Knowledge
## Current Context
- **Date**: ${currentDate} ${currentTime}
- **Web Host**: geoff.seemueller.io
- Web Host open-gsio.seemueller.workers.dev
${maxTokens ? `- **Response Limit**: ${maxTokens} tokens (maximum)` : ""}
- **Lexicographical Format**: Commonmark marked.js with gfm enabled.
- **User Location**: ${userLocation || "Unknown"}