Skip to content

Commit a3a2fdc

Browse files
committed
Improve toTitleCase function to handle mixed-case words
The `toTitleCase` function now only converts words to title case if they are entirely lowercase. This prevents altering words that already contain capital letters, preserving intentional formatting.
1 parent 9700598 commit a3a2fdc

File tree

6 files changed

+90
-68
lines changed

6 files changed

+90
-68
lines changed

app/dfda/components/FindTreatments.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ export default function FindTreatments() {
1919
<section>
2020
<Card>
2121
<CardHeader>
22-
<CardTitle>Find Treatments & Join Trials</CardTitle>
22+
<CardTitle>
23+
Find Treatments & Join Trials
24+
</CardTitle>
2325
<CardDescription>
2426
Search for treatments and clinical trials related to your condition
2527
</CardDescription>

app/dfda/components/TreatmentConditionSearchBox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export default function TreatmentConditionSearchBox() {
7979
{results.map((result) => (
8080
<li key={`${result.type}-${result.id}`}>
8181
<Link
82-
href={`/dfda//${result.type}s/${encodeURIComponent(result.name)}`}
82+
href={`/dfda/${result.type}s/${encodeURIComponent(result.name)}`}
8383
className="block px-4 py-2 hover:bg-accent hover:text-accent-foreground text-sm"
8484
>
8585
{result.name} ({result.type})

app/dfda/conditions/[conditionName]/treatments/[treatmentName]/page.tsx

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,19 @@ import GlobalHealthOptimizationAgent from "@/components/landingPage/global-healt
88
import { useSession } from 'next-auth/react'
99

1010
export default function TreatmentForConditionPage() {
11-
const { data: session, status } = useSession()
11+
const { data: session, status } = useSession()
1212
const params = useParams()
1313
const [article, setArticle] = useState<ArticleWithRelations | null>(null)
14-
const [loading, setLoading] = useState(status === "loading")
15-
16-
if (loading) {
17-
return <div>Loading...</div>
18-
}
14+
const [loading, setLoading] = useState(true)
1915

2016
useEffect(() => {
17+
if (!params) return;
18+
2119
async function fetchMetaAnalysis() {
22-
debugger
20+
if (!params) {
21+
console.error('Params is null in fetchMetaAnalysis');
22+
return;
23+
}
2324
console.log("Fetching meta-analysis for", params.treatmentName, params.conditionName)
2425
if (typeof params.treatmentName === 'string' && typeof params.conditionName === 'string') {
2526
try {
@@ -34,7 +35,16 @@ export default function TreatmentForConditionPage() {
3435
}
3536

3637
fetchMetaAnalysis()
37-
}, [params.treatmentName, params.conditionName])
38+
}, [params])
39+
40+
if (loading) {
41+
return <div>Loading...</div>
42+
}
43+
44+
if(!params){
45+
console.error('No URL params in TreatmentForConditionPage')
46+
return <div>No URL params!</div>
47+
}
3848

3949
if (loading) {
4050
return <div className="container mx-auto px-4 py-8">

app/dfda/treatments/[treatmentName]/page.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ export default function TreatmentPage() {
1313
const params = useParams()
1414
const [article, setArticle] = useState<ArticleWithRelations | null>(null)
1515
const [loading, setLoading] = useState(true)
16+
if(!params){
17+
console.error('No URL params in TreatmentPage')
18+
return <div>No URL params!</div>
19+
}
1620
const treatmentName = typeof params.treatmentName === 'string' ? decodeURIComponent(params.treatmentName) : ''
1721

1822
useEffect(() => {

lib/stringHelpers.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ export function convertKeysToCamelCase(obj: any): any {
1616

1717
export function toTitleCase(str: string): string {
1818
return str.replace(/\w\S*/g, function (txt: string): string {
19-
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase()
19+
// Only convert to title case if the word is all lowercase
20+
if (txt === txt.toLowerCase()) {
21+
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase()
22+
}
23+
return txt
2024
})
2125
}
Lines changed: 59 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,86 @@
11
---
22
slug: paradise-engineer
3-
name: Join the Mission to Engineer a Utopian AI-Driven Virtual World
3+
name: Help Us Create a Semi-Autonomous Todo List For Humanity
44
featuredImage: /docs/organization/paradise-engineer.jpg
55
description: >-
6-
Discover how to become a Paradise Engineer and create virtual worlds filled
7-
with pro-social AI! Learn about crafting Digital Twins, Decider Agents, and
8-
Actor Agents in just three easy steps to maximize universal well-being while
9-
respecting human rights. Join us now and make a difference!
6+
We're seeking a talented and passionate Full Stack Developer to join our remote team and help build the core infrastructure of Wishonia. This is a unique opportunity to work on cutting-edge technology that has the potential to make a significant positive impact on the world.
107
---
118

129
![Paradise Engineers Wanted](../../images/paradise-engineers-wanted-wide.png)
1310

14-
## Your Mission
11+
# Full Stack NextJS Developer
1512

16-
Create a forkable virtual world filled with pro-social AI agents that maximize universal wish fulfillment while respecting the basic rights of meat.
13+
## About Wishonia
1714

18-
## Just 3 Easy Steps!
15+
Wishonia is an ambitious open-source project aiming to create a decentralized, AI-powered system for global problem-solving and coordination. Our goal is to maximize universal health and happiness by leveraging collective intelligence, AI agents, and advanced coordination mechanisms.
1916

20-
Although this sounds like a daunting task, it can be broken down into three simple steps:
17+
## The Role
2118

22-
### 1. Learn
19+
We're seeking a talented and passionate Full Stack NextJS Developer to join our remote team and help build the core infrastructure of Wishonia. This is a unique opportunity to end suffering and create a utopian AI-driven virtual world.
2320

24-
Fortunately, the Learn phase is fairly straightforward and technically feasible today. We just need to create **Digital Twins** of real-world entities and populate them with data.
21+
## Responsibilities
2522

26-
These entities primarily fall into two categories:
23+
- Develop and maintain key components of the Wishonia platform, including the wish management system, budget allocation system, and task management system
24+
- Work with AI technologies to implement research agents, goal decomposition agents, and task agents
25+
- Implement and optimize the Aggregated Pairwise Preference Allocation (APPA) mechanism
26+
- Develop integrations with external systems and protocols
27+
- Contribute to the design and implementation of the digital twin system
28+
- Write clean, efficient, and well-documented code
29+
- Participate in code reviews and collaborate with team members to improve overall code quality
30+
- Stay up-to-date with emerging technologies and industry trends
2731

28-
- **organizations** - nonprofits, governments, companies, etc.
29-
- **people** - scientists, employees, doctors, patients, etc.
32+
## Required Skills and Experience
3033

31-
Each of these digital twins should have its own vector database of defining data. The most fundamental components of each entity would be its:
34+
- Strong proficiency in TypeScript and React
35+
- Experience with Next.js and Prisma ORM
36+
- Familiarity with AI/ML technologies, particularly large language models
37+
- Experience with database design and optimization (PostgreSQL)
38+
- Solid understanding of RESTful APIs and GraphQL
39+
- Familiarity with containerization (Docker) and cloud platforms (preferably Vercel)
40+
- Strong problem-solving skills and attention to detail
41+
- Excellent communication skills and ability to work in a collaborative environment
42+
- Passion for open-source development and global impact projects
3243

33-
- **wishes** - goals, desires, objectives, etc.
34-
- **resources** - data, humans, capital, etc. that can be allocated, pooled, or exchanged with other entities to fulfill wishes.
44+
## Nice-to-Have
3545

36-
These digital twins serve primarily as an easy source of information for other agents (deciders and actors).
46+
- Experience with AI frameworks like LangChain or similar
47+
- Knowledge of vector databases and knowledge graph technologies
48+
- Familiarity with decentralized technologies and systems
49+
- Experience with decentralized data storage solutions (IPFS, Ceramic, etc.)
3750

38-
## 2. Plan
51+
## Work Schedule
3952

40-
**Planning Agents** that create hypotheses about the most efficient ways to fulfill various wishes while respecting universal human rights. These **Decider Agents** then use semi-quantitative cost benefit analysis to decide which strategies seem most promising.
53+
- This is a remote position
54+
- Ability to work at least 4 hours daily within West Coast normal work hours (Pacific Time) is required
4155

42-
Humans can then review these strategies and decide which ones to test. Once a strategy is selected, the **Planning Agents** can then create **Actor Agents** to carry out the strategies.
56+
## What We Offer
4357

44-
## 3. Act
45-
46-
**Actor Agents** then carry out plans and measure the results. Given current their limitations, **Actor Agents** should:
47-
48-
1. automate what they can, using tools
49-
2. outsource what they can't to humans by creating bounties
50-
51-
### Key Responsibilities
52-
53-
- **AI Agent Development:** Create and refine proof-of-concept AI agents using existing [autonomous agent frameworks](../../knowledge/autonomous-agent-frameworks.md) (e.g., AutoGen, TaskWeaver, ChatDev, MetaGPT). Ensure these agents can simulate real-world scenarios and decisions for optimal societal outcomes.
54-
- **API & Framework Expertise:** Develop robust APIs and work with OpenAPI specifications. Utilize frameworks such as Next.js and React for scalable, efficient applications.
55-
- **Documentation & Support:** Produce comprehensive documentation to assist users and contributors in understanding and utilizing AI agents.
56-
- **Community Engagement:** Organize and lead supportive events and meetings for contributors, fostering a collaborative environment.
57-
- **Project Management:** Regularly update on project progress, strategize future developments, and navigate potential obstacles. Coordinate with various organizations and contributors for seamless integration and progress.
58-
- **Hackathon Coordination:** Plan and execute hackathons focusing on specific [autonomous agent frameworks](../../knowledge/autonomous-agent-frameworks.md), guiding participants in creating diverse AI agents for public good projects.
59-
60-
### Skills and Experience
61-
62-
- **Technical Expertise:** Proven experience in creating APIs, OpenAPI specifications, and working with frameworks like Next.js and React.
63-
- **AI and Machine Learning:** Experience in fine-tuning and deploying open-source AI models, including large language models. Familiarity with [autonomous agent frameworks](../../knowledge/autonomous-agent-frameworks.md) such as AutoGen, TaskWeaver, ChatDev, and MetaGPT.
64-
- **Open Source Contributions:** A history of significant open-source contributions, showcasing your skills and collaborative nature.
65-
- **Communication and Leadership:** Strong communication skills for effective documentation, meetings, and collaborative projects. Leadership experience in guiding teams and managing complex projects.
66-
- **Ethical AI and Data Privacy:** Knowledge of ethical AI practices and data privacy regulations to ensure responsible development and deployment.
67-
- **Problem-Solving and Adaptability:** Ability to navigate and solve complex technical challenges in a rapidly evolving field.
68-
- **Passion for Social Impact:** A deep interest in using technology for societal betterment, aligning with the vision outlined in [Gaming the Future](https://foresightinstitute.substack.com/p/start-here).
69-
70-
**Why Join Us:**
71-
72-
Your work will directly contribute to creating a world of abundance, peace, and universal well-being. You'll be at the forefront of AI development, working on groundbreaking technologies and concepts that could redefine our society. (If you like that kind of thing?)
58+
- The opportunity to work on a revolutionary project with global impact
59+
- A collaborative and innovative work environment
60+
- Flexible working hours and fully remote setup
61+
- Continuous learning and professional development opportunities
62+
- Competitive compensation package based on experience
7363

7464
## How to Apply
7565

76-
Create a pro-social agent that improves the world using [an agent framework](../agent-frameworks.md) and [submit a pull request](https://github.com/wishocracy/positron).
77-
78-
Since reasoning capabilities are still limited, you might want to focus on the first "Learn" phase and create a **Digital Twin** of an organization or person.
79-
80-
More details and submission guidelines are available in the [Collabathon Instructions](../collabathons/collabathons.md).
81-
82-
Here are some other [ideas for possible agents as well](../agent-ideas).
66+
1. Submit your application by email to [contact email] including:
67+
- Your resume
68+
- A brief introduction about yourself
69+
- Why you're interested in the Wishonia project
70+
- Your relevant experience and skills
71+
- Your GitHub profile link
72+
73+
2. (Optional) For bonus consideration, you may also:
74+
- Fork the Wishonia repository on GitHub: [https://github.com/wishonia/wishonia](https://github.com/wishonia/wishonia)
75+
- Create a new branch with a descriptive name related to your contribution
76+
- Make a meaningful contribution to the project. This could be:
77+
- Fixing a bug
78+
- Implementing a small feature
79+
- Improving documentation
80+
- Optimizing existing code
81+
- Create a pull request with your changes
82+
- Include a link to your pull request in your application email
83+
84+
We'll review all applications and get in touch if we'd like to move forward. If you choose to submit a pull request, we'll consider it as part of your application, but it's not required.
8385

8486
Then email [[email protected]](mailto:[email protected]) with a link to your pull request and tell us why you have what it takes to become a paradise engineer!

0 commit comments

Comments
 (0)