Skip to content

Commit 674f043

Browse files
authored
bugfix - Notebooks circular dependency fix (#3104)
* updated circular dep on notebooks, suppress the critical dependency warning from @protobufjs/inquire Signed-off-by: Lucas <lyoon@redhat.com> * changelogs Signed-off-by: Lucas <lyoon@redhat.com> * cleanup Signed-off-by: Lucas <lyoon@redhat.com> * remove webpack.config.js - moved to separate PR The webpack.config.js approach won't work for this use case. Moving to separate PR for investigation. Signed-off-by: Lucas <lyoon@redhat.com> * address comments Signed-off-by: Lucas <lyoon@redhat.com> * no more url on the frontend Signed-off-by: Lucas <lyoon@redhat.com> --------- Signed-off-by: Lucas <lyoon@redhat.com>
1 parent 603759f commit 674f043

10 files changed

Lines changed: 52 additions & 1068 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@red-hat-developer-hub/backstage-plugin-lightspeed-backend': minor
3+
---
4+
5+
URL filetype backend support removed

workspaces/lightspeed/app-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ organization:
1818

1919
lightspeed:
2020
notebooks:
21-
enabled: true
21+
enabled: false
2222
queryDefaults:
23-
model: llama3.2:3b
24-
provider_id: vllm
23+
model: ${NOTEBOOKS_QUERY_MODEL}
24+
provider_id: ${NOTEBOOKS_QUERY_PROVIDER_ID}
2525

2626
backend:
2727
# Used for enabling authentication, secret is shared by all backend plugins

workspaces/lightspeed/plugins/lightspeed-backend/src/service/constant.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ When you lack evidence, output ONLY: "I cannot answer this based on the provided
7070

7171
/**
7272
* HTTP and networking constants
73+
* @reserved Reserved for future URL file type support
7374
*/
7475
export const URL_FETCH_TIMEOUT_MS = 30000; // 30 second timeout for URL fetching
7576
export const USER_AGENT = 'RHDH-Notebooks-Bot/1.0'; // User agent for HTTP requests
@@ -110,6 +111,7 @@ export const PROXY_PASSTHROUGH_PATHS = [
110111
/**
111112
* SSRF Protection - Blocked hostnames for security
112113
* These hostnames are commonly used for Server-Side Request Forgery attacks
114+
* @reserved Reserved for future URL file type support
113115
*/
114116
export const SSRF_BLOCKED_HOSTNAMES = [
115117
'localhost',
@@ -126,6 +128,7 @@ export const SSRF_BLOCKED_HOSTNAMES = [
126128
/**
127129
* Prompt Injection Protection - Patterns to detect and sanitize
128130
* These patterns are commonly used in prompt injection attacks
131+
* @reserved Reserved for future URL file type support
129132
*/
130133
export const PROMPT_INJECTION_PATTERNS = [
131134
/ignore\s+(all\s+)?previous\s+(instructions?|prompts?)/gi,
@@ -148,6 +151,7 @@ export const PROMPT_INJECTION_PATTERNS = [
148151

149152
/**
150153
* Content sanitization constants
154+
* @reserved Reserved for future URL file type support
151155
*/
152156
export const MAX_CONSECUTIVE_NEWLINES = 4; // Max consecutive newlines allowed in content
153157
export const FILTERED_CONTENT_MARKER = '[CONTENT_FILTERED]'; // Marker for filtered content
@@ -163,7 +167,6 @@ export const FILE_TYPE_TO_MIME: Record<string, string> = {
163167
yaml: 'application/x-yaml',
164168
yml: 'application/x-yaml',
165169
pdf: 'application/pdf',
166-
url: 'text/plain', // URLs are stored as plain text content
167170
};
168171

169172
export const MAX_QUERY_RETRIES = 1; // Max number of retries for query
@@ -186,9 +189,12 @@ export enum SupportedFileType {
186189
YAML = 'yaml',
187190
YML = 'yml',
188191
LOG = 'log',
189-
URL = 'url',
190192
}
191193

194+
/**
195+
* HTML parsing constants for stripping tags and extracting text
196+
* @reserved Reserved for future URL file type support
197+
*/
192198
export const HTML_BLOCK_TAGS = new Set([
193199
'div',
194200
'p',

0 commit comments

Comments
 (0)